mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 07:34:42 -04:00
refactor(config.js): Extract config file
* Separate different config source to each files * Freeze config object
This commit is contained in:
parent
4738ba7d36
commit
ecb0533605
15 changed files with 767 additions and 618 deletions
|
@ -3,13 +3,14 @@
|
|||
var fs = require('fs')
|
||||
var path = require('path')
|
||||
var Sequelize = require('sequelize')
|
||||
const {cloneDeep} = require('lodash')
|
||||
|
||||
// core
|
||||
var config = require('../config')
|
||||
var logger = require('../logger')
|
||||
|
||||
var dbconfig = config.db
|
||||
dbconfig.logging = config.debug ? logger.info : false
|
||||
var dbconfig = cloneDeep(config.db)
|
||||
dbconfig.logger = config.debug ? logger.info : false
|
||||
|
||||
var sequelize = null
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue