Show Menu
Cheatography

Meteor Cheat Sheet (DRAFT) by

Meteor is a Node-based JavaScript platform for developing reactive websites.

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

Command Line Tools

meteor --help
Prints the help inform­ation for the
meteor
command
meteor create <ap­p_n­ame>
Creates a new Applic­ation called
<ap­p_n­ame>
meteor
Starts your applic­ation
meteor mongo
Connects to the running app's MongoDB instance
meteor add <pa­cka­ge>
Adds a new package to the applic­ation
meteor reset
Resets the project state (removes the local DB!)

Core

Meteor.is­Client
Value is
true
in client enviro­nment
Anywhere
Meteor.is­Server
Value is
true
in server enviro­nment
Anywhere
Meteor.is­Cordova
Value is
true
in a Cordova mobile enviro­nment
Anywhere
Meteor.st­artup(func)
Run the function when the client­/server starts
Anywhere
Meteor.ab­sol­ute­Url(/[path], [options])
Generates an absolute URL pointing to the applic­ation
Anywhere
 

Folders

/.meteor
Holds the meteor­-sp­ecific files
/client
Files only visibl­e/e­xecuted on the Client
/clien­t/c­omp­ati­bility
For JavaScript files that rely on variables declared with var at the top level. These scripts are executed without being wrapped in a new variable scope.
/server
Files only visibl­e/e­xecuted on the Server
/public
Files servered as-is to the Client
/private
Files are only accessible from the Server code
/tests
Used for local tests only. Any files in this folder is not loaded anywhere in the running applic­ations.