home
  • Blog
3.27
  • Introduction
  • Getting Started
  • Tutorial
  • Core Concepts
  • Components
  • Routing
  • Services
  • Ember Data
  • In-Depth Topics
  • Application Development
  • Application Concerns
  • Accessibility
  • Configuration
    • Configuring Your App
    • Configuring Ember CLI
    • Handling Deprecations
    • Disabling Prototype Extensions
    • Specifying the URL Type
    • Embedding Applications
    • Feature Flags
    • Optional Features
    • Build targets
    • Debugging
  • Testing
  • Addons and Dependencies
  • Developer Tools
  • Ember Inspector
  • Code Editors
  • Additional Resources
  • Upgrading
  • Contributing to Ember.js
  • Glossary
Old Guides - You are viewing the guides for Ember v3.27.0.
Go to v5.0.0

Configuring Your App

Edit pencil

While Ember gives you strong defaults so that you might never need to configure anything, it still supports configuring your app if you need to! Ember CLI ships with support for managing your application's environment. The runtime environment for the application is defined in config/environment.js. Here an object ENV is built for each of the three Ember CLI-supported build modes: development, test, and production.

Three notable properties on the ENV object are:

  • EmberENV can be used to define Ember feature flags (see the Feature Flags guide) to be enabled at runtime.
  • APP can be used to pass flags or options to the app's Application instance.
  • environment by default contains which of the build environments was selected at build time (development, test, or production).

The ENV object is defined at build time, but you can access the ENV object in application code via import from your-application-name/config/environment.

For example:

import ENV from 'your-application-name/config/environment';

if (ENV.environment === 'development') {
  // ...
}
left arrow
Learning Resources
Configuring Ember CLI
right arrow
Team Sponsors Security Legal Branding Community Guidelines
Twitter GitHub Discord Mastodon

If you want help you can contact us by email, open an issue, or get realtime help by joining the Ember Discord.

© Copyright 2023 - Tilde Inc.
Ember.js is free, open source and always will be.


Ember is generously supported by
blue