Config
Hierarchical configurations for your app:
Set with
export NODE_ENV=production
Uses the default configuration values unless the production one explicitly has a value for that key
default.json
Edit config overrides for production deployment:
emacs config/production.json
Use configs in your code:
config.get()
will throw an exception for undefined keys to help catch typos and missing values. Use config.has()
to test if a configuration value is defined.
Start your app server:
Running in this configuration, the port
and dbName
elements of dbConfig
will come from the default.json
file, and the host
element will come from the production.json
override file.
Last updated