Ember App Kit API URL Question


#1

Hi Guys, Was hoping I could get some clarity about a couple EAK files, specifically config/environments/production.js and config/environments/development.js. My API endpoint is different for each of those environment and I would like to customize them accordingly. Currently I’m using the proxyURL property in package.json to dictate where the API is. Any thoughts on what property needs to be defined in the above files to direct my Ember app to those endpoints for requests?

Thanks!


#2

In my adapter, I have something like

var ApplicationAdapter = DS.RESTAdapter.extend({
  host: window.ENV.api_host,
  namespace: window.ENV.api_namespace
});

export default ApplicationAdapter;

and in my config, I have

window.ENV.api_namespace = 'api';
window.ENV.api_host = 'http://localhost:8000';

The proxyURL is only used for the local express server here and here.

In summary, there are no specific params, not that I know of anyways. You have to set yours.