Selectors

Mongo-Style Selectors The simplest selectors are just a string or Mongo.ObjectID. These selectors match the document with that value in its _id field. A slightly more complex form of selector is an object containing a set of keys that must match in a document: // Matches all documents where deleted is false {deleted: false} // Matches all documents where the name and cognomen are as given {name: "Rhialto", cognomen: "the Marvelous"} // Matches every document {} But they can also contain mo

Accounts.sendResetPasswordEmail

Server Accounts.sendResetPasswordEmail(userId, [email]) import { Accounts } from 'meteor/accounts-base' Source Send an email with a link the user can use to reset their password. Arguments userId String The id of the user to send email to. email String Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

Meteor.setInterval

Anywhere Meteor.setInterval(func, delay) import { Meteor } from 'meteor/meteor' Source Call a function repeatedly, with a time delay between calls. Arguments func Function The function to run delay Number Number of milliseconds to wait between each function call.

Introduction

What is Meteor? Meteor is a full-stack JavaScript platform for developing modern web and mobile applications. Meteor includes a key set of technologies for building connected-client reactive applications, a build tool, and a curated set of packages from the Node.js and general JavaScript community. Meteor allows you to develop in one language, JavaScript, in all environments: application server, web browser, and mobile device. Meteor uses data on the wire, meaning the server sends data, not

Renderable content

Renderable Content A value is renderable content if it is one of the following: A template object like Template.myTemplate An unrendered View object, like the return value of Blaze.With null or undefined Internally, renderable content includes objects representing HTML tags as well, but these objects are not yet part of the officially-supported, public API.

HTTP.call

Anywhere HTTP.call(method, url, [options], [asyncCallback]) import { HTTP } from 'meteor/http' Source Perform an outbound HTTP request. Arguments method String The HTTP method to use, such as "GET", "POST", or "HEAD". url String The URL to retrieve. asyncCallback Function Optional callback. If passed, the method runs asynchronously, instead of synchronously, and calls asyncCallback. On the client, this callback is required. Options content String String to use as the HT

collection.insert

Anywhere collection.insert(doc, [callback]) Source Insert a document in the collection. Returns its unique _id. Arguments doc Object The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you. callback Function Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.

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

Accounts.sendEnrollmentEmail

Server Accounts.sendEnrollmentEmail(userId, [email]) import { Accounts } from 'meteor/accounts-base' Source Send an email with a link the user can use to set their initial password. Arguments userId String The id of the user to send email to. email String Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

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