@ryleigh
To add a custom environment for Ember.js, you can follow these steps:
Here is an example of how you can define a custom environment configuration:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
// config/environment-custom.js /* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'my-ember-app', environment: environment, rootURL: '/', locationType: 'auto', API_URL: 'https://api.custom.com' }; return ENV; }; |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
// ember-cli-build.js const EmberApp = require('ember-cli/lib/broccoli/ember-app'); module.exports = function(defaults) { let app = new EmberApp(defaults, { environment: EmberApp.env(), // Import custom environment settings configPath: 'config/environment-custom.js' }); return app.toTree(); }; |
1
|
ember serve --environment=custom |
By following these steps, you can add a custom environment for your Ember.js project and configure it with specific settings for your development, staging, or production environments.