meteor

Getting started with meteor

Remarks#

Meteor is a full-stack JavaScript platform for developing modern Web and mobile applications.

Within one project, you are able to build your client (browser and/or hybrid mobile App for Android and/or iOS) and server sides.

Reference pages:

Versions#

VersionRelease Date
0.4.02012-08-30
0.5.02013-10-17
0.6.02013-04-04
0.7.02013-12-20
0.8.02014-04-21
0.9.02014-08-26
0.9.12014-09-04
0.9.22014-09-15
0.9.32014-09-25
0.9.42014-10-13
1.0.12014-12-09
1.0.22014-12-19
1.0.3.12014-12-09
1.1.02015-03-31
1.2.02015-09-21
1.3.02016-03-27
1.4.02016-07-25
1.5.02017-05-30

Getting Started


Install Meteor

On OS X and Linux

Install the latest official Meteor release from your terminal:

$ curl https://install.meteor.com/ | sh

On Windows

Download the official Meteor installer here.

Create your app


Once you’ve installed Meteor, create a project:

$ meteor create myapp

Run it


Run it locally:

$ cd myapp
$ meteor npm install
$ meteor

Note: Meteor server running on: https://localhost:3000/

Then head to https://localhost:3000 to see your new Meteor application.


  • Read more about getting started with Meteor at the [Meteor Guide].
  • Explore Meteor Packages at atmosphere - a modern, fast, well engineered package manager.

Sample apps

Meteor has several sample apps built-in. You can create a project with one of them and learn from how it was built. To create a sample app, install Meteor (see Getting Started) and then type:

meteor create --example <app name>

For example to create a sample todos app, write:

meteor create --example todos

To get a list of all sample apps, type:

meteor create --list

Managing Packages

Meteor has it’s own package repository on atmospherejs.com

You can add new packages from atmosphere by running:

meteor add [package-author-name:package-name]

For example:

meteor add kadira:flow-router

Similarly, you can remove the same package by:

meteor remove kadira:flow-router

To see current packages in your project, type:

meteor list

List of packages can also be found in the file ./meteor/packages. To add a package add the package name in this file and to remove delete it.

To add a package locally, (e.g. unpublished packages or edited version of published packages), save the package in packages folder in the root.

Starting with version 1.3, Meteor added support for npm packages.

You can use the npm command inside Meteor project’s directory as you would normally do without Meteor, or with the meteor npm command, which will use the bundled version of npm.

Understanding build progress

Sometimes builds take longer than expected. There are a few environment variables you can set to better understand what’s happening during the build process.

METEOR_DEBUG_BUILD=1       (logs progress)
METEOR_PROFILE=<n>         (logs time spent)
METEOR_DEBUG_SPRINGBOARD=1 (?)
METEOR_DEBUG_SQL=1         (logs SQLITE calls)
METEOR_PROGRESS_DEBUG=1    (? looks like it might be useful, but seems confusing)

Where <n> is a number of ms. Any process taking longer than this will be logged.

Linux/OSX Example

export METEOR_DEBUG_BUILD=1
export METEOR_PROFILE=100
meteor

Windows Example

set METEOR_DEBUG_BUILD=1
set METEOR_PROFILE=100
meteor

Checking the Version of the Meteor Tool & Meteor Projects

Meteor Tool

To check the installed version of the Meteor tool, just run the following command outside of any Meteor projects:

meteor --version

To get a list of all official (recommended) Meteor releases, run:

meteor show METEOR

Meteor Projects

If you want to check the project version of Meteor, you can also execute the following command inside a project:

meteor --version

or just print content of the file .meteor/release:

cat .meteor/release

In case you want to check the version of the packages which are currently installed in your Meteor project, print the content of the file .meteor/versions:

cat .meteor/versions

Meteor Website

To see which version of Meteor a Meteor based website is running, dump the contents of Meteor.release in your browsers console while visiting the website:

Meteor.release

Updating Meteor Projects & Installed Packages

The Meteor Tool will notify you when a newer release is available.

To update Meteor projects to the latest release, execute the following command inside a Meteor project:

meteor update

In case you want to update your Meteor project to a specific Meteor release, run the following command inside the project:

meteor update --release <release>

If you want to update all non-core packages, run:

meteor update --packages-only

You can also update specific packages by passing their names as a command line argument to meteor update, for example:

meteor update [packageName packageName2 ...]

Build Mobile Apps

Meteor uses Cordova to package your application into a hybrid Mobile App. Once packaged, the App can be distributed like native Apps (through Apple App Store, Google Play Store, etc.)

  1. Add the target platform(s) to your Meteor project:
meteor add-platform android
meteor add-platform ios # Only available with Mac OS
  1. Install the Android SDK and/or Xcode (for iOS, requires Mac OS).

  2. Run your project (start with development mode):

meteor run android # You may need to configure a default Android emulator first

For iOS (only available with Mac OS):

meteor run ios # This will auto start an iOS simulator
  1. Build your App package for distribution:
meteor build <output_folder> --server <url_app_should_connect_to>

This will create android and/or ios folder(s) alongside your server bundle.

  • The android folder contains the release-unsigned.apk file that you need to sign and zip align.
  • The ios folder contains the Xcode project that you need to sign.

See also the Meteor Mobile Apps topic.
Reference page: Meteor Guide > Build > Mobile


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow