Match patterns

Match Patterns The following patterns can be used as pattern arguments to check and Match.test: Match.Any Matches any value. String, Number, Boolean, undefined, null Matches a primitive of the given type. Match.Integer Matches a signed 32-bit integer. Doesn't match Infinity, -Infinity, or NaN. [pattern] A one-element array matches an array of elements, each of which match pattern. For example, [Number] matches a (possibly empty) array of numbers; [Match.Any] matches any array. {key1: pattern1

Sort specifiers

Sort Specifiers Sorts may be specified using your choice of several syntaxes: // All of these do the same thing (sort in ascending order by // key "a", breaking ties in descending order of key "b") [["a", "asc"], ["b", "desc"]] ["a", ["b", "desc"]] {a: 1, b: -1} The last form will only work if your JavaScript implementation preserves the order of keys in objects. Most do, most of the time, but it's up to you to be sure. For local collections you can pass a comparator function which receives

collection.find

Anywhere collection.find([selector], [options]) Source Find the documents in a collection that match the selector. Arguments selector Mongo Selector, Object ID, or String A query describing the documents to find Options sort Mongo Sort Specifier Sort order (default: natural order) skip Number Number of results to skip at the beginning limit Number Maximum number of results to return fields Mongo Field Specifier Dictionary of fields to return or exclude. reactive B

collection.allow

Server collection.allow(options) Source Allow users to write directly to this collection from client code, subject to limitations you define. Options insert, update, remove Function Functions that look at a proposed modification to the database and return true if it should be allowed. fetch Array of Strings Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions. transform Function Overrides

meteor deploy

meteor deploy site Deploy the project in your current directory to Galaxy. You can deploy in debug mode by passing --debug. This will leave your source code readable by your favorite in-browser debugger, just like it is in local development mode. To delete an application you've deployed, specify the --delete option along with the site. You can add information specific to a particular deployment of your application by using the --settings option. The argument to --settings is a file containing

meteor test-packages

meteor test-packages Test Meteor packages, either by name, or by directory. Not specifying an argument will run tests for all local packages. The results are displayed in an app that runs at localhost:3000 by default. If you need to, you can pass the --settings and --port arguments.

meteor publish-release

meteor publish-release Publishes a release of Meteor. Takes in a JSON configuration file. Meteor releases are divided into tracks. While only MDG members can publish to the default Meteor track, anyone can create a track of their own and publish to it. Running meteor update without specifying the --release option will not cause the user to switch tracks. To publish to a release track for the first time, use the --create-track flag. The JSON configuration file must contain the name of the releas

App.configurePlugin

App.configurePlugin(id, config) Set the build-time configuration for a Cordova plugin. Arguments id String The identifier of the plugin you want to configure. config Object A set of key-value pairs which will be passed at build-time to configure the specified plugin.

spiderable

Your JavaScript code can run in two environments: the client (browser), and the server (a Node.js container on a server). For each function in this API reference, we'll indicate if the function is available just on the client, just on the server, or Anywhere. Meteor Core Anywhere Meteor.isClient import { Meteor } from 'meteor/meteor' Source Boolean variable. True if running in client environment. Anywhere Meteor.isServer import { Meteor } from 'meteor/meteor' Source Boolean va

Security

After reading this guide, you’ll know: The security surface area of a Meteor app. How to secure Meteor Methods, publications, and source code. Where to store secret keys in development and production. How to follow a security checklist when auditing your app. Introduction Securing a web application is all about understanding security domains and understanding the attack surface between these domains. In a Meteor app, things are pretty simple: Code that runs on the server can be trusted. Every