How to install rootURL in Ember CLI

I am trying to change roolURL in an Ember CLI application. It's easy in a basic Ember app:

App.Router.reopen({
  rootURL: '/blog/'
});

      

Doing this in an Ember CLI application throws the following exception:

Uncaught TypeError: Cannot read property 'reopen' of undefined 

      

The reason I would like to do this is because I will have multiple Ember CLI applications inside a rails application. The URLs will look something like this:

/ --> rails
/foo --> rails
/api --> rails
/admin --> Ember CLI
/blog --> Ember CLI

      

+3


source to share


1 answer


You want to update your /environment.js config like this:

module.exports = function(environment) {
    var ENV = {
        environment: environment,
        baseURL: '/blog/'

      



see http://www.ember-cli.com/#deployments for specific environment configurations.

+6


source







All Articles