chore: 🤖 add support for API_HOST build-time config

This commit is contained in:
Randall Morey committed 2020-05-20 11:47:31 -04:00
1 parent bf72b02efd
commit e6bbdcbcf4
5 files changed
+20 -1

No files matched your search

+7
View File
@@ -5,6 +5,13 @@ import { get } from '@ember/object';
export default class ApplicationAdapter extends RESTAdapter {
// =attributes
/**
* Sets host to the `api.host` string in the application's config,
* if set.
* @type {string}
*/
host = get(config, 'api.host');
/**
* Sets namespace to the `api.namespace` string in the application's config,
* if set.
+2 -1
View File
@@ -23,7 +23,8 @@ module.exports = function (environment) {
},
api: {
namespace: '/api/addon/v1',
host: '',
namespace: 'v1',
},
};