Some method of determining environments is needed in config files. This will likely be controlled by a cli arg given to crux start / core/init.js, eg.
$ crux start --env=development
The default should be "production" so that no extra config is needed to deploy.
#6 working on environment support
The current changes for environment support allow for the environment to be defined two different ways. First, the environment can be set as a cli arg, eg.
$ crux start --environment development
Second, it can also be provided as an environment variable, eg.
$ CRUX_ENVIRONMENT=development node ./core/init.js
If an environment arg is given, it will always have precedence over a cli arg. If no environment is given either way, it will default to "production".
In the ./config directory, there is now a directory global where the config files (which are now .js files, not .json) have been moved. To make use of the environment value, a new directory can be created in ./config where override config values can be defined (eg. a file ./config/development/http.js could be created to change the hostname and port when in development).
Also, the current environment can be determined using $.environment();.
fixed #6; environments supported