The rest of the docs for Meteor.settings

This commit is contained in:
Naomi Seyfer
2012-12-11 17:27:37 -08:00
parent f247840536
commit 06a3e23730
4 changed files with 22 additions and 9 deletions

View File

@@ -30,6 +30,8 @@ put on the screen.
{{> api_box absoluteUrl}}
{{> api_box settings}}
<h2 id="publishandsubscribe"><span>Publish and subscribe</span></h2>
These functions control how Meteor servers publish sets of records and

View File

@@ -54,6 +54,17 @@ Template.api.absoluteUrl = {
]
};
Template.api.settings = {
id: "meteor_settings",
name: "Meteor.settings",
locus: "Server",
descr: ["`Meteor.settings` contains any deployment-specific options that were " +
"provided using the `--settings` option for `meteor run` or `meteor deploy`. " +
"If you provide the `--settings` option, `Meteor.settings` will be the " +
"JSON object in the file you specify. Otherwise, `Meteor.settings` will " +
"be an empty object."]
};
Template.api.publish = {
id: "meteor_publish",
name: "Meteor.publish(name, func)",

View File

@@ -92,15 +92,14 @@ address of origin.meteor.com.
To add deploy-specific information to your application, use the `--settings`
option. This will set the variable `Meteor.settings` in your application, but
only on the server. The `--settings` option takes an argument: the name of a
file containing JSON data to put into `Meteor.settings`.
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 any JSON string. The object in your settings file will appear on the
server side of your application in [`Meteor.settings`](#meteor_settings).
The settings you pass will persist on your deployed application across
invocations of `meteor deploy` until you again pass the `--settings` option with
different contents in your settings file. To unset `Meteor.settings`, pass an
empty settings file.
Settings are persistent. When you redeploy your app, the old value will be
preserved unless you explicitly pass new settings using the `--settings` option.
To unset `Meteor.settings`, pass an empty settings file.
<h3 id="meteorlogs">meteor logs <i>site</i></h3>

View File

@@ -94,7 +94,8 @@ var toc = [
"Meteor.isClient",
"Meteor.isServer",
"Meteor.startup",
"Meteor.absoluteUrl"
"Meteor.absoluteUrl",
"Meteor.settings"
],
"Publish and subscribe", [