Skip to content

Environments and config files

Matias Lescano edited this page Apr 28, 2015 · 4 revisions

There are 3 environments supported by default: development, testing, production. But you could also apply your custom environment as explained bellow.

Development

This is the default environment when NODE_ENV is not specified. The configuration file for this environment should be placed at config/development.json. When running with make this file is automatically generated from config/defaults.json if NODE_ENV is not present. Then you can customize it the way you like.

Testing

In order to enable this environment you have to set NODE_ENV=testing. The configuration file for this environment should be placed at config/testing.json. When running with make this file is automatically generated from config/defaults.json if NODE_ENV is properly set. Then you can customize it the way you like.

Production

In order to enable this environment you have to set NODE_ENV=production. The configuration file for this environment should be placed at config/production.json. When running with make this file is automatically generated from config/defaults.json if NODE_ENV is properly set. Then you can customize it the way you like.

Custom environment

In order to set a custom environment you need to set NODE_ENV=mycustomenv. The configuration file for this environment should be placed at config/mycustomenv.json. When running with make this file is automatically generated from config/defaults.json if NODE_ENV is properly set. Then you can customize it the way you like. Since this environment is not supported, it will not match any of the specific application settings made for development, testing nor production.