config load immediatly and once
This commit is contained in:
parent
3e33252d06
commit
d6f647ccd2
5 changed files with 1 additions and 4 deletions
|
@ -1,5 +1,4 @@
|
||||||
const config = require('./server/config.js')
|
const config = require('./server/config.js')
|
||||||
config.load()
|
|
||||||
const minifyTheme = require('minify-css-string').default
|
const minifyTheme = require('minify-css-string').default
|
||||||
|
|
||||||
const isDev = (process.env.NODE_ENV !== 'production')
|
const isDev = (process.env.NODE_ENV !== 'production')
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
let db
|
let db
|
||||||
function _initializeDB () {
|
function _initializeDB () {
|
||||||
const config = require('../config')
|
const config = require('../config')
|
||||||
config.load()
|
|
||||||
config.log_level = 'error'
|
config.log_level = 'error'
|
||||||
db = require('../api/models/index')
|
db = require('../api/models/index')
|
||||||
return db.initialize()
|
return db.initialize()
|
||||||
|
|
|
@ -37,4 +37,5 @@ let config = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config.load()
|
||||||
module.exports = config
|
module.exports = config
|
|
@ -1,4 +1,3 @@
|
||||||
// needed by sequelize
|
// needed by sequelize
|
||||||
const config = require('./config')
|
const config = require('./config')
|
||||||
config.load()
|
|
||||||
module.exports = config.db
|
module.exports = config.db
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
const config = require('../server/config')
|
const config = require('../server/config')
|
||||||
config.load()
|
|
||||||
|
|
||||||
const initialize = {
|
const initialize = {
|
||||||
// close connections/port/unix socket
|
// close connections/port/unix socket
|
||||||
|
|
Loading…
Reference in a new issue