WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

EmberJS Configuring App and Ember CLI


You can design the Ember App and CLI for dealing with the application's condition. The earth config record will be available at config/environment.js. It contains the accompanying code structure −

 

module.exports = function(environment) { 

var ENV = { 

modulePrefix: 'question params',/it is the name of use 

condition: condition, 

baseURL: '/', 

locationType: 'auto', 

EmberENV: { 

Highlights: { 

/Here you can empower test includes on an ash canary form 

/for example 'with-controller': genuine 

} 

}, 

Application: { 

/Here you can pass banners/alternatives to your application occasion 

/when it is made 

API_HOST: 'http://localhost:3000' 

} 

}; 

on the off chance that (condition === 'improvement') { 

/code here 

} 

on the off chance that (condition === 'test') { 

/code here 

} 

on the off chance that (condition === 'creation') { 

} 

return ENV; 

}; 

The ENV object incorporates the accompanying three keys −

  • EmberENV − It gives the Ember include flags.

  • APP − It is utilized to pass banners/choices to your application instance.

  • environment − It gives the present condition names, for example, development, production and test.

Configuring Ember CLI

You can design the Ember CLI by adding the arrangements to the .ember-cli document which is available in your application's root.

For example, you can pass the port number by utilizing the order ash server - port 8080 from the direction line. This arrangement can be included the .ember-cli document as appeared beneath −

 

{ 

"port" : 8080 

}