Mongo.Cursor

Cursors To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch. Anywhere cursor.forEach(callback, [thisArg]) Source Call callback once for each matching document, sequentially and synchronously. Arguments callback Function Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself. thisArg Any An object which will be the value of this inside callback. This interface is compatible with Array

meteor search

meteor search Searches for Meteor packages and releases, whose names contain the specified regular expression.

meteor login / logout

meteor login / logout Log in and out of your account using Meteor's authentication system. You can pass METEOR_SESSION_FILE=token.json before meteor login to generate a login session token so you don't have to share your login credentials with third-party service providers. You can revoke the token at any time from your accounts settings page. Once you have your account you can log in and log out from the command line, and check your username with meteor whoami.

Deployment and Monitoring

After reading this guide, you’ll know: What to consider before you deploy a Meteor application. How to deploy to some common Meteor hosting environments. How to design a deployment process to make sure your application’s quality is maintained. How to monitor user behavior with analytics tools. How to monitor your application with Kadira. How to make sure your site is discoverable by search engines. Deploying Meteor Applications Once you’ve built and tested your Meteor application, you need to

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

Meteor.wrapAsync

Anywhere Meteor.wrapAsync(func, [context]) import { Meteor } from 'meteor/meteor' Source Wrap a function that takes a callback function as its final parameter. The signature of the callback of the wrapped function should be function(error, result){}. On the server, the wrapped function can be used either synchronously (without passing a callback) or asynchronously (when a callback is passed). On the client, a callback is always required; errors will be logged if there is no callback. If

Meteor.absoluteUrl

Anywhere Meteor.absoluteUrl([path], [options]) import { Meteor } from 'meteor/meteor' Source Generate an absolute URL pointing to the application. The server reads from the ROOT_URL environment variable to determine where it is running. This is taken care of automatically for apps deployed to Galaxy, but must be provided when using meteor build. Arguments path String A path to append to the root URL. Do not include a leading "/". Options secure Boolean Create an HTTPS URL. re

Meteor.disconnect

Client Meteor.disconnect() import { Meteor } from 'meteor/meteor' Source Disconnect the client from the server.

Accounts.findUserByUsername

Server Accounts.findUserByUsername(username) import { Accounts } from 'meteor/accounts-base' Source Finds the user with the specified username. First tries to match username case sensitively; if that fails, it tries case insensitively; but if more than one user matches the case insensitive search, it returns null. Arguments username String The username to look for

Accounts.removeEmail

Server Accounts.removeEmail(userId, email) import { Accounts } from 'meteor/accounts-base' Source Remove an email address for a user. Use this instead of updating the database directly. Arguments userId String The ID of the user to update. email String The email address to remove.