-
Notifications
You must be signed in to change notification settings - Fork 2
Configuration
Daniel M. Hendricks edited this page Dec 1, 2019
·
1 revision
Configuration files are located in the config
directory. default.json
is used when NODE_ENV
is not defined or where a matching environment configuration file does not exist.
If you'd like to have a different configuration file a particular environment ("production", for example):
- Set the environment at the command line:
export NODE_ENV=production
- Create a
config/production.json
file with variables fromconfig/default.json
that you'd like to override. Example:
{
"server": {
"address": "0.0.0.0"
},
"demo_page": false,
"api_keys": [
"abc123def",
"tuv456xyz"
],
"sockets": [
"my-socket-name"
]
}
api_keys
is an empty array, validation will not occur and all message will be accepted (useful for local development and debugging, not recommended when publicly accessible).
📌 See restify-cors-middleware for CORS configuration options.