Getting started with meteor
Within one project, you are able to build your client (browser and/or hybrid mobile App for Android and/or iOS) and server sides.
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.)
- Add the target platform(s) to your Meteor project:
meteor add-platform android meteor add-platform ios # Only available with Mac OS
- Install the Android SDK and/or Xcode (for iOS, requires Mac OS).
- 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
- Build your App package for distribution:
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.
Checking the Version of the Meteor Tool & Meteor Projects
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:
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:
On OS X and Linux
Install the latest official Meteor release from your terminal:
Create your app
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.
- Read more about getting started with Meteor at the [Meteor Guide].
- Explore Meteor Packages at atmosphere - a modern, fast, well engineered package manager.
Meteor has it's own package repository on atmospherejs.com
You can add new packages from atmosphere by running:
Similarly, you can remove the same package by:
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:
For example to create a sample
todos app, write:
To get a list of all sample apps, type:
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.
<n> is a number of ms. Any process taking longer than this will be logged.
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:
In case you want to update your Meteor project to a specific Meteor release, run the following command inside the project:
If you want to update all non-core packages, run:
You can also update specific packages by passing their names as a command line argument to
meteor update, for example: