Skip to content
Snippets Groups Projects
Commit 3f505dbe authored by Richard Torenvliet's avatar Richard Torenvliet
Browse files

Update to work with production and development

parent 7d1908fa
No related branches found
No related tags found
No related merge requests found
import JSONAPIAdapter from 'ember-data/adapters/json-api';
import ENV from 'viewer/config/environment';
export default JSONAPIAdapter.extend({
host: 'http://localhost:8888',
host: ENV.APP.APIURL,
namespace: 'api/v1'
});
import Ember from 'ember';
import ENV from 'viewer/config/environment';
const { get, inject } = Ember;
......@@ -19,7 +20,7 @@ export default Ember.Controller.extend({
socketRef: null,
init() {
const socket = get(this, 'websockets').socketFor('ws://localhost:8888/reconstruction');
const socket = get(this, 'websockets').socketFor(ENV.APP.websocketsURL);
socket.on('open', this.openHandler, this);
socket.on('message', this.messageHandler, this);
......
......@@ -7,6 +7,9 @@ module.exports = function(environment) {
baseURL: '/',
locationType: 'auto',
EmberENV: {
EXTEND_PROTOTYPES: {
Date: false,
},
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
......@@ -20,7 +23,10 @@ module.exports = function(environment) {
};
if (environment === 'development') {
ENV.APP.staticURL = 'http://localhost:8888/data/';
ENV.APP.websocketsURL = 'ws://localhost:6930/reconstruction';
ENV.APP.staticURL = 'http://localhost:6930/data/';
ENV.APP.APIURL = 'http://localhost:6930';
// ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = true;
// ENV.APP.LOG_TRANSITIONS = true;
......@@ -41,7 +47,11 @@ module.exports = function(environment) {
}
if (environment === 'production') {
ENV.APP.websocketsURL = 'wss://richard.kompiler.org/reconstruction';
ENV.APP.staticURL = 'https://richard.kompiler.org/data/';
ENV.APP.APIURL = 'https://richard.kompiler.org';
ENV.baseURL = '/face-reconstruction/';
ENV.rootURL = '/face-reconstruction/';
}
return ENV;
......
......@@ -4,21 +4,30 @@ var EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
// Add options here
sourcemaps: { enabled: true, extensions: ['js']},
minifyJS: {
enabled: false
},
minifyCSS: {
enabled: false
},
fingerprint: {
enabled: true
}
});
// bower compoenents
app.import('bower_components/basscss/modules/align/index.css');
app.import('bower_components/basscss/modules/border/index.css');
app.import('bower_components/basscss/modules/flexbox/index.css');
app.import('bower_components/basscss/modules/grid/index.css');
app.import('bower_components/basscss/modules/hide/index.css');
app.import('bower_components/basscss/modules/layout/index.css');
app.import('bower_components/basscss/modules/margin/index.css');
app.import('bower_components/basscss/modules/padding/index.css');
app.import('bower_components/basscss/modules/position/index.css');
app.import('bower_components/basscss/modules/type-scale/index.css');
app.import('bower_components/basscss/modules/typography/index.css');
//app.import('bower_components/basscss/modules/align/index.css');
//app.import('bower_components/basscss/modules/border/index.css');
//app.import('bower_components/basscss/modules/flexbox/index.css');
//app.import('bower_components/basscss/modules/grid/index.css');
//app.import('bower_components/basscss/modules/hide/index.css');
//app.import('bower_components/basscss/modules/layout/index.css');
//app.import('bower_components/basscss/modules/margin/index.css');
//app.import('bower_components/basscss/modules/padding/index.css');
//app.import('bower_components/basscss/modules/position/index.css');
//app.import('bower_components/basscss/modules/type-scale/index.css');
//app.import('bower_components/basscss/modules/typography/index.css');
// npm modules
//app.import('node_modules/basscss-responsive-margin/css/responsive-margin.css');
......
......@@ -21,6 +21,7 @@
"devDependencies": {
"basscss-responsive-margin": "^1.1.0",
"broccoli-asset-rev": "^2.4.2",
"dat-gui": "^0.5.0",
"ember-ajax": "^2.0.1",
"ember-browserify": "1.1.10",
"ember-cli": "2.6.2",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment