config load immediatly and once

This commit is contained in:
lesion 2022-06-18 01:15:52 +02:00
parent 3e33252d06
commit d6f647ccd2
No known key found for this signature in database
GPG key ID: 352918250B012177
5 changed files with 1 additions and 4 deletions

View file

@ -1,5 +1,4 @@
const config = require('./server/config.js')
config.load()
const minifyTheme = require('minify-css-string').default
const isDev = (process.env.NODE_ENV !== 'production')

View file

@ -1,7 +1,6 @@
let db
function _initializeDB () {
const config = require('../config')
config.load()
config.log_level = 'error'
db = require('../api/models/index')
return db.initialize()

View file

@ -37,4 +37,5 @@ let config = {
}
}
config.load()
module.exports = config

View file

@ -1,4 +1,3 @@
// needed by sequelize
const config = require('./config')
config.load()
module.exports = config.db

View file

@ -1,5 +1,4 @@
const config = require('../server/config')
config.load()
const initialize = {
// close connections/port/unix socket