mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
The rest of the docs for Meteor.settings
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)",
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -94,7 +94,8 @@ var toc = [
|
||||
"Meteor.isClient",
|
||||
"Meteor.isServer",
|
||||
"Meteor.startup",
|
||||
"Meteor.absoluteUrl"
|
||||
"Meteor.absoluteUrl",
|
||||
"Meteor.settings"
|
||||
],
|
||||
|
||||
"Publish and subscribe", [
|
||||
|
||||
Reference in New Issue
Block a user