diff --git a/app/adapters/application.js b/app/adapters/application.js index f0bf514..66590ea 100644 --- a/app/adapters/application.js +++ b/app/adapters/application.js @@ -1,6 +1,7 @@ import JSONAPIAdapter from '@ember-data/adapter/json-api'; +import ENV from 'gwt-frontend/config/environment'; export default class ApplicationAdapter extends JSONAPIAdapter { - namepace = 'api/v1/'; - host = 'http://gwt.api'; + namespace = 'api/v1'; + host = ENV.APP.hostUrl; } diff --git a/config/environment.js b/config/environment.js index 626c449..bb4eec8 100644 --- a/config/environment.js +++ b/config/environment.js @@ -29,6 +29,7 @@ module.exports = function(environment) { // ENV.APP.LOG_TRANSITIONS = true; // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; // ENV.APP.LOG_VIEW_LOOKUPS = true; + ENV.APP.hostUrl = 'http://gwt.api'; } if (environment === 'test') { @@ -45,6 +46,7 @@ module.exports = function(environment) { if (environment === 'production') { // here you can enable a production-specific feature + ENV.APP.hostUrl = 'http://backend.bibletranslationresources.org'; } return ENV;