Accounts.onEnrollmentLink

Client Accounts.onEnrollmentLink import { Accounts } from 'meteor/accounts-base' Source Register a function to call when an account enrollment link is clicked in an email sent by Accounts.sendEnrollmentEmail. This function should be called in top-level code, not inside Meteor.startup(). Arguments callback Function The function to call. It is given two arguments: token: A password reset token that can be passed to Accounts.resetPassword to give the newly enrolled account a password.

meteor update

meteor update Attempts to bring you to the latest version of Meteor, and then to upgrade your packages to their latest versions. By default, update will not break compatibility. For example, let's say packages A and B both depend on version 1.1.0 of package X. If a new version of A depends on X@2.0.0, but there is no new version of package B, running meteor update will not update A, because doing so will break package B. You can pass in the flag --packages-only to update only the packages, and

Meteor.apply

Anywhere Meteor.apply(name, args, [options], (Boolean), [asyncCallback]) import { Meteor } from 'meteor/meteor' Source Invoke a method passing an array of arguments. Arguments name String Name of method to invoke args Array of EJSON-able Objects Method arguments (Boolean) , or undefined options.noRetry (Client only) if true, don't send this method again on reload, simply call the callback an error with the error code 'invocation-failed'. asyncCallback Function Optional ca

Meteor.call

Anywhere Meteor.call(name, [arg1, arg2...], [asyncCallback]) import { Meteor } from 'meteor/meteor' Source Invokes a method passing any number of arguments. Arguments name String Name of method to invoke arg1, arg2... EJSON-able Object Optional method arguments asyncCallback Function Optional callback, which is called asynchronously with the error or result after the method is complete. If not provided, the method runs synchronously if possible (see below).

Field specifiers

Field Specifiers Queries can specify a particular set of fields to include or exclude from the result object. To exclude specific fields from the result objects, the field specifier is a dictionary whose keys are field names and whose values are 0. All unspecified fields are included. Users.find({}, {fields: {password: 0, hash: 0}}) To include only specific fields in the result documents, use 1 as the value. The _id field is still included in the result. Users.find({}, {fields: {firstname: 1

collection.update

Anywhere collection.update(selector, modifier, [options], [callback]) Source Modify one or more documents in the collection. Returns the number of affected documents. Arguments selector Mongo Selector, Object ID, or String Specifies which documents to modify modifier Mongo Modifier Specifies how to modify the documents callback Function Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

Meteor.loggingIn

Client Meteor.loggingIn() import { Meteor } from 'meteor/meteor' Source True if a login method (such as Meteor.loginWithPassword, Meteor.loginWithFacebook, or Accounts.createUser) is currently in progress. A reactive data source.

EJSON.stringify

Anywhere EJSON.stringify(val, [options]) import { EJSON } from 'meteor/ejson' Source Serialize a value to a string. For EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as JSON.stringify. Arguments val EJSON-able Object A value to stringify. Options indent Boolean, Integer, or String Indents objects and arrays for easy readability. When true, indents by 2 spaces; when an integer, indents by that number of spaces; and when

Change log

2016/04/16: Switch order of Code Style and Application structure sections. PR #383 2016/04/16: Added Writing Packages - Creating an npm package and Using Packages - Overriding packages - npm. PR #381 2016/04/07: Add more examples and details on application structure using imports. PR #356 2016/04/04: Add more content on writing and publishing Atmosphere packages. PR #339 2016/04/03: Add back in build tool default loading order rules. PR #340 2016/04/01: Added CoffeeScript exports syntax. P

Contribution guidelines

Please submit clarifications and improvements to the Guide! If it’s just a small fix, go ahead and open a PR. If it’s something more major, please file an issue for discussion first. Using the change log If you are adding significant new content, please take a moment to include an update to the changelog in your PR. Writing tips Things to be aware of: Always use specific IDs on headers so that we can change them later: // bad ## Using schemas with collections // good <h2 id="schemas-with-co