Show Menu
Cheatography

Meteor.js Cheat Sheet (DRAFT) by

Meteor Javascript

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Command Line

meteor help
Get help
meteor create <na­me>
Make a subdir­ectory called <na­me> and create a new Meteor app there.
meteor debug
Run the project with Node Inspector attached, so that you can step through your server code line by line. See meteor debug in the full docs for more inform­ation
meteor deploy <si­te>
Bundle your app and deploy it to <si­te>. Meteor provides free hosting if you deploy to <your app>.m­ete­or.com as long as <your app> is a name that has not been claimed by someone else.
meteor update
Update your Meteor instal­lation to the latest released version and then (if meteor update was run from an app directory) update the packages used by the current app to the latest versions that are compatible with all other packages used by the app.
meteor add
Add a package (or multiple packages) to your Meteor project. To query for available packages, use the meteor search command.
meteor remove
Remove a package previously added to your Meteor project. For a list of the packages that your applic­ation is currently using, use the meteor list command.
meteor mongo
Opens a MongoDB shell for viewing and/or manipu­lating collec­tions stored in the database. Note that you must already be running a server for the current app (in another terminal window) in order for meteor mongo to connect to the app's database.
meteor reset
Reset the current project to a fresh state. Removes all local data.
 

Special direct­ories

/client
Any files here are only served to the client. This is a good place to keep your HTML, CSS, and UI-related JavaScript code.
/server
Any files in this directory are only used on the server, and are never sent to the client. Use /server to store source files with sensitive logic or data that should not be visible to the client.
/public
Files in /public are served to the client as-is. Use this to store assets such as images. For example, if you have an image located at /publi­c/b­ack­gro­und.png, you can include it in your HTML with <img src='/­bac­kgr­oun­d.p­ng'­/> or in your CSS with backgr­oun­d-i­mage: url(/b­ack­gro­und.png). Note that /public is not part of the image URL.
/private
These files can only be accessed by server code through Assets API and are not accessible to the client.