Change config from json to yaml

- Added possibility to override config with env vars
- Reorganized config structures
This commit is contained in:
Claudemiro
2018-11-25 23:39:12 +01:00
parent 964df8a5dd
commit f4781ee483
14 changed files with 102 additions and 97 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
client: go run client.go
server: go run ../cmd/main.go -config ./functional-config.json -alsologtostderr
server: go run ../cmd/main.go -config ./functional-config.yml -alsologtostderr
-21
View File
@@ -1,21 +0,0 @@
{
"Host": ":8080",
"SSL": false,
"Profiling": true,
"SSLHost": ":8090",
"SSLKeyFile": "key.pem",
"SSLCertFile": "cert.pem",
"Apps": [
{
"ApplicationDisabled": false,
"OnlySSL": false,
"Secret": "7ad3753142a6693b25b9",
"Key": "278d525bdf162c739803",
"Name": "App for Functional Test",
"AppID": "1",
"UserEvents": true,
"WebHooks": true,
"URLWebHook": "http://127.0.0.1:5000/hook"
}
]
}
+19
View File
@@ -0,0 +1,19 @@
---
host: ':8080'
profiling: false
ssl:
enabled: false
host: ':4343'
key_file: 'key.pem'
cert_file: 'cert.pem'
apps:
- name: 'Sample Application'
enabled: true
only_ssl: false
key: '278d525bdf162c739803'
secret: '7ad3753142a6693b25b9'
app_id: '1'
user_events: true
webhooks:
enabled: true # Default is false
url: 'http://127.0.0.1:5000/hook'