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

Meteor.release

Anywhere Meteor.release import { Meteor } from 'meteor/meteor' Source Meteor.release is a string containing the name of the release with which the project was built (for example, "1.2.3"). It is undefined if the project was built using a git checkout of Meteor.

Meteor.publish

Server Meteor.publish(name, func) import { Meteor } from 'meteor/meteor' Source Publish a record set. Arguments name String Name of the record set. If null, the set has no name, and the record set is automatically sent to all connected clients. func Function Function called on the server each time a client subscribes. Inside the function, this is the publish handler object, described below. If the client passed arguments to subscribe, the function is called with the same argument

HTTP.put

Anywhere HTTP.put(url, [callOptions], [asyncCallback]) import { HTTP } from 'meteor/http' Source Send an HTTP PUT request. Equivalent to calling HTTP.call with "PUT" as the first argument. Arguments url String The URL to which the request should be sent. callOptions Object Options passed on to HTTP.call. asyncCallback Function Callback that is called when the request is completed. Required on the client.

Template.currentData

Client Template.currentData() import { Template } from 'meteor/templating' Source Inside an onCreated, onRendered, or onDestroyed callback, returns the data context of the template. Inside an event handler, returns the data context of the template on which this event handler was defined. Inside a helper, returns the data context of the DOM node where the helper was used. Establishes a reactive dependency on the result.

Blaze.renderWithData

Client Blaze.renderWithData(templateOrView, data, parentNode, [nextNode], [parentView]) import { Blaze } from 'meteor/blaze' Source Renders a template or View to DOM nodes with a data context. Otherwise identical to Blaze.render. Arguments templateOrView Blaze.Template or Blaze.View The template (e.g. Template.myTemplate) or View object to render. data Object or Function The data context to use, or a function returning a data context. If a function is provided, it will be reactiv

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

Blaze.getData

Client Blaze.getData([elementOrView]) import { Blaze } from 'meteor/blaze' Source Returns the current data context, or the data context that was used when rendering a particular DOM element or View from a Meteor template. Arguments elementOrView DOM Element or Blaze.View Optional. An element that was rendered by a Meteor, or a View.

template.findAll

Client template.findAll(selector) Source Find all elements matching selector in this template instance. Arguments selector String The CSS selector to match, scoped to the template contents.

Package.describe

Package Description Provide basic package information with Package.describe(options). To publish a package, you must define summary and version. package.js Package.describe(options) Provide basic package information. Options summary String A concise 1-2 sentence description of the package, required for publication. version String The (extended) semver version for your package. Additionally, Meteor allows a wrap number: a positive integer that follows the version number. If you a