I am making an Ember app using Ember-Cli which talks to a server side application. Because Ember-Cli projects run with their own server (on port 4200 by default), I have to run my server in development on a different port (localhost:8080
) than the Ember app. In production, however, the two will be running on the same port.
Question: How can I configure Ember (in config/environment.js I presume) so that Ember-Data and all ajax requests will be made to localhost:8080 in development (in spite of the fact that the Ember app is running on 4200) and, in production, that Ember-Data and ajax requests will query whatever port the server side app is running on (which will be hosting the client side app).
Ember-Cli docs mention that some configuration can be done (for example that you can change the port that Ember-Cli runs on), however, it doesn't say how to accomplish the above