summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2018-03-09 14:52:18 +0100
committerhellekin <hellekin@cepheide.org>2018-03-09 14:52:18 +0100
commit6fea1b938966c8bbde8dcfa06c401b0625553347 (patch)
treeec357068aa6ac24697e31ee32c7e07865b1cb6b7 /assets
parent75cc89242a37911251948f13bf132878e03567ae (diff)
downloadwallonie-demain-proto-6fea1b938966c8bbde8dcfa06c401b0625553347.tar.gz
Make deployment transparent to the app
Diffstat (limited to 'assets')
-rw-r--r--assets/mapper.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/assets/mapper.js b/assets/mapper.js
index e02553f..e4451a5 100644
--- a/assets/mapper.js
+++ b/assets/mapper.js
@@ -146,9 +146,12 @@ Categories.forEach(function(c) {
})
// Where do we get our JSON data from
-const api_base = 'http://localhost/data/'
-//const api_base = 'https://map.incommon.cc/data/'
-//const api_base = 'http://maps.dewey.be/api'
+if (location.href.includes('localhost')) {
+ const api_base = 'http://localhost/data/'
+} else {
+ const api_base = 'https://map.incommon.cc/data/'
+ //const api_base = 'http://maps.dewey.be/api'
+}
const cat_uri = api_base + '/categories.json'
/**