-
-
Save kylemclaren/06124f55713a6739ea01 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
environment = process.env.NODE_ENV || "development"; | |
var settings = { | |
development: { | |
public: {}, | |
private: {} | |
}, | |
staging: { | |
public: {}, | |
private: {} | |
}, | |
production: { | |
public: {}, | |
private: {} | |
} | |
}; | |
if (!process.env.METEOR_SETTINGS) { | |
console.log("=> No METEOR_SETTINGS passed in, using locally defined settings."); | |
if (environment === "production") { | |
Meteor.settings = settings.production; | |
} else if (environment === "staging") { | |
Meteor.settings = settings.staging; | |
} else { | |
Meteor.settings = settings.development; | |
} | |
// Push a subset of settings to the client. | |
if (Meteor.settings && Meteor.settings.public) { | |
__meteor_runtime_config__.PUBLIC_SETTINGS = Meteor.settings.public; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment