Mongo.Collection

Anywhere new Mongo.Collection(name, [options]) import { Mongo } from 'meteor/mongo' Source Constructor for a Collection Arguments name String The name of the collection. If null, creates an unmanaged (unsynchronized) local collection. Options connection Object The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanag

modules

modules Though Meteor 1.2 introduced support for many new ECMAScript 2015 features, one of the most notable omissions was ES2015 import and export syntax. Meteor 1.3 fills that gap with a fully standards-compliant module system that works on both the client and the server, solves multiple long-standing problems for Meteor applications (such as controlling file load order), and yet maintains full backwards compatibility with existing Meteor code. This document explains the usage and key feature

Modifiers

Mongo-Style Modifiers A modifier is an object that describes how to update a document in place by changing some of its fields. Some examples: // Set the 'admin' property on the document to true {$set: {admin: true}} // Add 2 to the 'votes' property, and add "Traz" // to the end of the 'supporters' array {$inc: {votes: 2}, $push: {supporters: "Traz"}} But if a modifier doesn't contain any $-operators, then it is instead interpreted as a literal document, and completely replaces whatever was

Mobile

After reading this guide, you’ll know: What Cordova is, and how Meteor integrates with it to build mobile apps from a single codebase How to set up your local machine for mobile development How to run and debug your app on a mobile device or simulator/emulator How hot code push allows you to update your mobile app’s code without reinstalling the app on your device or submitting a new version to the store How to use Cordova plugins to take advantage of native device features How to access local

Migrating to Meteor 1.3

Breaking changes These are all the breaking changes – that is changes that you absolutely have to worry about if you are updating your app from 1.2.x to 1.3. However, we recommend that you also consider the recommended changes listed in the other sections below. Files in a directory named imports/ will no longer load eagerly. (You should probably rename such a directory as it the basis of our new module system). Files within your app named *.test[s].*, *.app-test[s].*, *.spec[s].* and *.app-

Methods

After reading this article, you’ll know: What Methods are in Meteor and how they work in detail. Best practices for defining and calling Methods. How to throw and handle errors with Methods. How to call a Method from a form. What is a Method? Methods are Meteor’s remote procedure call (RPC) system, used to save user input events and data that come from the client. If you’re familiar with REST APIs or HTTP, you can think of them like POST requests to your server, but with many nice features op

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.users

Anywhere Meteor.users import { Meteor } from 'meteor/meteor' Source A Mongo.Collection containing user documents.

Meteor.userId

Anywhere but publish functions Meteor.userId() import { Meteor } from 'meteor/meteor' Source Get the current user id, or null if no user is logged in. A reactive data source.

Meteor.user

Anywhere but publish functions Meteor.user() import { Meteor } from 'meteor/meteor' Source Get the current user record, or null if no user is logged in. A reactive data source.