Old Guides - You are viewing the guides for Ember
v2.15.0.
Ember CLI ships with support for managing your application's environment. Ember CLI will setup a default environment config file at config/environment. Here, you can define an ENV object for each environment, which are currently limited to three: development, test, and production.
The ENV object contains three important keys:
EmberENVcan be used to define Ember feature flags (see the Feature Flags guide).APPcan be used to pass flags/options to your application instance.environmentcontains the name of the current environment (development,productionortest).
You can access these environment variables in your application code by importing from your-application-name/config/environment.
For example:
import ENV from 'your-application-name/config/environment';
if (ENV.environment === 'development') {
// ...
}