Within one project, you are able to build your client (browser and/or hybrid mobile App for Android and/or iOS) and server sides.
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.)
meteor add-platform android meteor add-platform ios # Only available with Mac OS
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
meteor build <output_folder> --server <url_app_should_connect_to>
This will create
ios folder(s) alongside your server bundle.
androidfolder contains the
release-unsigned.apkfile that you need to sign and zip align.
iosfolder contains the Xcode project that you need to sign.
To check the installed version of the Meteor tool, just run the following command outside of any Meteor projects:
To get a list of all official (recommended) Meteor releases, run:
meteor show METEOR
If you want to check the project version of Meteor, you can also execute the following command inside a project:
or just print content of the file
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
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:
Install the latest official Meteor release from your terminal:
$ curl https://install.meteor.com/ | sh
Once you've installed Meteor, create a project:
$ meteor create myapp
Run it locally:
$ cd myapp $ meteor npm install $ meteor
Note: Meteor server running on: http://localhost:3000/
Then head to http://localhost:3000 to see your new Meteor application.
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]
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:
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.
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
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)
<n> is a number of ms. Any process taking longer than this will be logged.
export METEOR_DEBUG_BUILD=1 export METEOR_PROFILE=100 meteor
set METEOR_DEBUG_BUILD=1 set METEOR_PROFILE=100 meteor
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:
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 ...]