provides the getEnvironment() function to detect what environment a Node.js program is running in ('dev', 'stage', 'prod'). This module is a dependency for our custom GruntJS modules.
In your package.json
file, add this module as a dependency.
"dependencies": {
"via-environment": "git+ssh://[email protected]/viastudio/npm-via-environment.git"
}
var viaenv = require('via-environment');
viaenv.getEnvironment(); //returns 'dev', 'stage', 'prod' or false