Add app in config
This commit is contained in:
parent
cf888674e0
commit
b2ff77e7d3
@ -1,4 +1,8 @@
|
||||
{
|
||||
"app": {
|
||||
"name": "Secret Sender",
|
||||
"url": "https://127.0.0.1:3443"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"features": {
|
||||
|
@ -10,6 +10,8 @@ const load = () => {
|
||||
throw new Error('Config file not found')
|
||||
}
|
||||
_config = JSON.parse(fs.readFileSync(_configFile))
|
||||
if(! _config.app) _config.app = {}
|
||||
if(! _config.app.name) _config.app.name = 'Secret Sender'
|
||||
}
|
||||
|
||||
if(! _config) load()
|
||||
|
@ -1,7 +1,9 @@
|
||||
import bodyParser from "body-parser"
|
||||
import config from "./config.js"
|
||||
import vault from "./vault.js"
|
||||
|
||||
const _title = "Secret Sender"
|
||||
const _config = config.get()
|
||||
const _title = _config.app.name
|
||||
|
||||
const load = (router, features) => {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user