LinuxCommandLibrary

meteor

Develop and deploy Meteor applications

TLDR

Run a meteor project from its root directory in development mode

$ meteor
copy

Create a project under the given directory
$ meteor create [path/to/directory]
copy

Display the list of packages the project is currently using
$ meteor list
copy

Add a package to the project
$ meteor add [package]
copy

Remove a package from the project
$ meteor remove [package]
copy

Create a production build of the project as a tarball under the given directory
$ meteor build [path/to/directory]
copy

SYNOPSIS


meteor <command> [options] [arguments]

meteor [options]

PARAMETERS

meteor run
    
Description: Starts the Meteor development server, compiling and running the application. It automatically reloads on code changes.

meteor create <project-name>
    
Description: Generates a new Meteor application project with a default structure.

meteor add <package-name>
    
Description: Adds a specified Meteor package or npm package to the current project.

meteor remove <package-name>
    
Description: Removes a specified Meteor package or npm package from the current project.

meteor build <output-path>
    
Description: Compiles the application and bundles it into a deployable tarball for production.

meteor update
    
Description: Updates the Meteor release of the current project and its dependencies to the latest compatible versions.

meteor deploy <hostname>
    
Description: (Legacy/Specific) Historically, this deployed the application to a specified host, often Meteor Galaxy. Modern deployment typically involves meteor build and external hosting.

meteor npm <command>
    
Description: Executes npm commands (install, update, test, etc.) within the Meteor project's specific Node.js environment.

DESCRIPTION

Meteor is an open-source, full-stack JavaScript platform for building web and mobile applications. It provides a highly productive environment for creating real-time applications from scratch. Meteor bundles a reactive front-end (often integrated with frameworks like React, Angular, or Vue), a Node.js server, and a database (MongoDB by default), all communicating seamlessly. Its core principles include "Don't write what the database can do," promoting reactive data flows, and "isomorphic JavaScript," allowing the same code to run on both client and server. It simplifies development by integrating various technologies and handles data synchronization, client-side updates, and build processes efficiently. Meteor's command-line interface allows developers to create, run, build, and deploy applications with ease, significantly reducing setup time and fostering rapid prototyping and deployment. It supports cross-platform development for web, iOS, and Android from a single codebase.

CAVEATS


Important Considerations:

Meteor requires Node.js and npm for installation and often for managing project dependencies.
It is primarily a web/mobile application development framework, not a general-purpose Linux system utility.
While it simplifies many aspects, a foundational understanding of JavaScript, Node.js, and web development concepts is beneficial.
The meteor deploy command's direct cloud integration functionality has evolved; modern deployments often leverage meteor build for external hosting solutions.

INSTALLATION

Meteor is typically installed using npm or a dedicated install script:
curl https://install.meteor.com/ | sh
Alternatively, after installing Node.js and npm globally:
npm install -g meteor

PROJECT STRUCTURE

A typical Meteor project generally follows a convention-over-configuration approach. Key directories include:

client/: For client-side code (browser).
server/: For server-side code (Node.js).
public/: For static assets (images, fonts, etc.) that are served directly.
imports/: For modular code that needs to be explicitly imported, preventing eager loading.
lib/: For shared code that runs on both client and server.

HISTORY

Meteor was first released in December 2011 by Meteor Development Group (MDG). Its initial goal was to simplify the development of real-time web applications by providing a full-stack, opinionated framework built on JavaScript. It quickly gained popularity for its reactive data updates, "data on the wire" approach, and rapid prototyping capabilities. Over the years, Meteor has evolved, integrating more modern frontend libraries (like React, Angular, Vue), improving its build system, and adapting to changes in the JavaScript ecosystem. While its initial direct cloud hosting (meteor deploy) has shifted more towards flexible meteor build output for various cloud platforms (like Galaxy, Heroku, AWS, DigitalOcean), it remains a robust choice for building full-stack JavaScript applications.

SEE ALSO

node(1), npm(1), mongod(1), git(1)

Copied to clipboard