-
Notifications
You must be signed in to change notification settings - Fork 616
How to add configuration settings
Cristian Douce edited this page Oct 31, 2013
·
6 revisions
Follow this checklist whenever you need a new config value so the rest of us can continue coding happily with your changes.
- Add the configuration key to
config/sample.json
- If the setting is intended to be shared with the client, then list it at
client
key on the same file. - Edit
lib/config/env.js
to map the recently added keys. (Note: Environment variables name should be the same as the config variable name but in ALL_CAPS. Follow the examples in that file.) - Restart your app to get new
config
keys merged to yourconfig/<environment>.json
settings. (Note:client
settings won't be merged) - If needed, edit your
config/<environment>.json
file used or your environment settings for custom environment settings (non-default). - If new
client
settings added (check2.
) make sure your co-developers know they have to manually add those to theirconfig/<environment>.json
settings. - Add those values to
env vars
at your running environments so your new code works.
DemocracyOS developers should update all of these.
Visit our official website - Developed by Democracia en Red and contributors from the world over!