feat: dev flags

This commit is contained in:
Nick
2019-02-23 18:22:25 -05:00
parent bf505e6901
commit 2141366335
11 changed files with 124 additions and 6 deletions

View File

@@ -96,5 +96,11 @@ module.exports = {
}
return true
},
/**
* Apply Dev Flags
*/
async applyFlags() {
WIKI.models.knex.client.config.debug = WIKI.config.flags.sqllog
}
}

View File

@@ -14,6 +14,7 @@ module.exports = {
try {
await WIKI.models.onReady
await WIKI.configSvc.loadFromDb()
await WIKI.configSvc.applyFlags()
} catch (err) {
WIKI.logger.error('Database Initialization Error: ' + err.message)
if (WIKI.IS_DEBUG) {