diff options
author | hellekin <hellekin@cepheide.org> | 2018-03-09 14:52:18 +0100 |
---|---|---|
committer | hellekin <hellekin@cepheide.org> | 2018-03-09 14:52:18 +0100 |
commit | 6fea1b938966c8bbde8dcfa06c401b0625553347 (patch) | |
tree | ec357068aa6ac24697e31ee32c7e07865b1cb6b7 | |
parent | 75cc89242a37911251948f13bf132878e03567ae (diff) | |
download | wallonie-demain-proto-6fea1b938966c8bbde8dcfa06c401b0625553347.tar.gz |
Make deployment transparent to the app
-rw-r--r-- | assets/mapper.js | 9 |
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' /** |