1
0
mirror of https://github.com/flarum/core.git synced 2025-08-01 14:10:37 +02:00

More flexible API URL (necessary for testing)

This commit is contained in:
Toby Zerner
2015-01-23 12:48:21 +10:30
parent cd0b6300d8
commit a9b19f62e0
4 changed files with 8 additions and 5 deletions

View File

@@ -1,8 +1,9 @@
import JsonApiAdapter from 'ember-json-api/json-api-adapter';
import config from '../config/environment';
export default JsonApiAdapter.extend({
// Todo: make this loaded via an environment variable or something
host: '/api'
host: config.apiURL
});

View File

@@ -5,6 +5,7 @@ module.exports = function(environment) {
modulePrefix: 'flarum',
environment: environment,
baseURL: '/',
apiURL: '/api',
locationType: 'hash',
EmberENV: {
FEATURES: {
@@ -31,6 +32,7 @@ module.exports = function(environment) {
// Testem prefers this...
ENV.baseURL = '/';
ENV.locationType = 'none';
ENV.apiURL = 'http://flarum.dev/api',
// keep test console output quieter
ENV.APP.LOG_ACTIVE_GENERATION = false;