update: simplify config

This commit is contained in:
Clément
2018-12-17 15:21:18 +01:00
parent b840c2fdb6
commit d3c3d6d921
9 changed files with 58 additions and 23 deletions
-4
View File
@@ -1,4 +0,0 @@
- var sdn = process.env.SDN || 'https://test-paris.happy-dev.fr'
- var cdn = process.env.CDN || 'staging-app.happy-dev.fr'
- var xmpp = 'https://jabber.happy-dev.fr/http-bind/'
- var client_id = 833925
+15
View File
@@ -0,0 +1,15 @@
{
"dev": {
"sdn": "http://127.0.0.1:8000",
"cdn": "https://cdn.happy-dev.fr",
"xmpp": "https://jabber.happy-dev.fr/http-bind/",
"client_id": "833925"
},
"prod": {
"sdn": "https://test-paris.happy-dev.fr",
"cdn": "https://cdn.happy-dev.fr",
"xmpp": "https://jabber.happy-dev.fr/http-bind/",
"client_id": "833925"
}
}
-4
View File
@@ -1,4 +0,0 @@
- var sdn = process.env.SDN || 'http://127.0.0.1:8000'
- var cdn = process.env.CDN || 'staging-app.happy-dev.fr'
- var xmpp = 'https://jabber.happy-dev.fr/http-bind/'
- var client_id = 863031
+15
View File
@@ -0,0 +1,15 @@
{
"dev": {
"sdn": "http://127.0.0.1:8000",
"cdn": "https://cdn.happy-dev.fr",
"xmpp": "https://jabber.happy-dev.fr/http-bind/",
"client_id": "833925"
},
"prod": {
"sdn": "https://test-paris.happy-dev.fr",
"cdn": "https://cdn.happy-dev.fr",
"xmpp": "https://jabber.happy-dev.fr/http-bind/",
"client_id": "833925"
}
}
-4
View File
@@ -1,4 +0,0 @@
- var sdn = process.env.SDN || 'http://127.0.0.1:8000'
- var cdn = process.env.CDN || 'https://cdn.happy-dev.fr'
- var xmpp = 'https://jabber.happy-dev.fr/http-bind/'
- var client_id = '833925'
+6
View File
@@ -0,0 +1,6 @@
- var __env = locals[process.env.ENV]
-
for(k in __env){
eval(`var ${k} = __env[${JSON.stringify(k)}]`);
}
+1 -1
View File
@@ -1,4 +1,4 @@
include config.pug
include get_config.pug
<!DOCTYPE html>
html(lang="en")
head