1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-13 16:45:05 +01:00

fix endpoint bug

This commit is contained in:
Tim Daubenschütz 2015-06-24 18:02:32 +02:00
parent 8b2096600c
commit f04ab169d6
2 changed files with 5 additions and 3 deletions

View File

@ -53,10 +53,12 @@ var config = {
]
};
var SERVER_URL = process.env.ONION_SERVER_URL || 'http://staging.ascribe.io/';
var constants = {
BASE_URL: (function () { var baseUrl = process.env.ONION_BASE_URL || '/'; return baseUrl + (baseUrl.match(/\/$/) ? '' : '/'); })(),
SERVER_URL: process.env.ONION_SERVER_URL || 'http://staging.ascribe.io/',
API_ENDPOINT: process.env.ONION_SERVER_URL + 'api/' || 'http://staging.ascribe.io/api/',
SERVER_URL: SERVER_URL,
API_ENDPOINT: SERVER_URL + 'api/' || 'http://staging.ascribe.io/api/',
DEBUG: !argv.production,
CREDENTIALS: 'ZGltaUBtYWlsaW5hdG9yLmNvbTowMDAwMDAwMDAw' // dimi@mailinator:0000000000
};

View File

@ -11,8 +11,8 @@
<link rel="stylesheet" href="<%= BASE_URL %>static/css/maps/main.css.map">
<script>
window.BASE_URL = '<%= BASE_URL %>';
window.API_ENDPOINT = '<%= API_ENDPOINT %>';
window.SERVER_URL = '<%= SERVER_URL %>';
window.API_ENDPOINT = '<%= API_ENDPOINT %>';
<% DEBUG && print('window.DEBUG = true'); %>
<% DEBUG && print('window.CREDENTIALS = \'' + CREDENTIALS + '\''); %>
</script>