ember-hostname-environment
v1.0.7
Published
Manipulate ember environment configuration by a hostname
Downloads
84
Readme
Ember Hostname Environment
Manipulate ember-cli ENV
as you like by creating a node module by the name config/environment-{hostname}.js
Note: This is not a standard ember-addon
Installation
npm install ember-hostname-environment --save-dev
Usage
- Create a module with the name
config/environment-{computer-name}.js
of the form:
//config/environment-my-computer-name.js
module.exports = function(ENV){
//Here you can manipulate the ENV object as you like
//Note that you can use ENV.environment ( can be 'development' || 'production' || 'test')
//Of course, eventually, you HAVE TO RETURN ENV!!!
return ENV;
}
- In
config/environment.js
add the following:
var emberHostnameEnvironment = require('ember-hostname-environment');
module.exports = function(environment) {
var ENV = {
// ...
// ...
// ...
};
//..
//..
//..
return emberHostnameEnvironment(ENV);
};