Divshot Ember app not reading production environment variable

90 Views Asked by At

I have an ember-cli application that I'm deploying to Divshot using the ember-cli-divshot addon. In my config/environment.js file I want to have a different api between development and production.

Inside var ENV = {} I have:

api: 'http://localhost:3000'

And the I have this for production:

if (environment === 'production')
  ENV.api = '<my production api>'
}

However when I do divshot push production, my Ember app is trying to hit the localhost endpoint for the api.

1

There are 1 best solutions below

1
Dhaulagiri On

After some work I realized that I need to make sure the I'm building and deploying the production version of my Ember app, which is actually built into the ember-cli-divshot addon by prepending the deploy command with ember like this:

ember divshot push production