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

spacebars

spacebars Spacebars is a Meteor template language inspired by Handlebars. It shares some of the spirit and syntax of Handlebars, but it has been tailored to produce reactive Meteor templates when compiled.

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

Spacebars

Spacebars Spacebars is the language used to write Meteor templates. It is inspired by Handlebars. It shares some of the spirit and syntax of Handlebars, but has been tailored to produce reactive Meteor templates when compiled. For more information about Spacebars, see the Spacebars README.

Session.setDefault

Client Session.setDefault(key, value) import { Session } from 'meteor/session' Source Set a variable in the session if it hasn't been set before. Otherwise works exactly the same as Session.set. Arguments key String The key to set, eg, selectedItem value EJSON-able Object or undefined The new value for key

Session.set

Client Session.set(key, value) import { Session } from 'meteor/session' Source Set a variable in the session. Notify any listeners that the value has changed (eg: redraw templates, and rerun any Tracker.autorun computations, that called Session.get on this key.) Arguments key String The key to set, eg, selectedItem value EJSON-able Object or undefined The new value for key

Session.equals

Client Session.equals(key, value) import { Session } from 'meteor/session' Source Test if a session variable is equal to a value. If inside a reactive computation, invalidate the computation the next time the variable changes to or from the value. Arguments key String The name of the session variable to test value String, Number, Boolean, null, or undefined The value to test against

Session.get

Client Session.get(key) import { Session } from 'meteor/session' Source Get the value of a session variable. If inside a reactive computation, invalidate the computation the next time the value of the variable is changed by Session.set. This returns a clone of the session value, so if it's an object or an array, mutating the returned value has no effect on the value stored in the session. Arguments key String The name of the session variable to return

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

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