Compare View
Commits (2)
Changes
Showing 4 changed files Side-by-side Diff
config-filler.js
config-reload.js
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | |
3 | 3 | const config = require('./config'); |
4 | 4 | const logger = require('./logger'); |
5 | +const configFiller = require('./config-filler'); | |
5 | 6 | |
6 | 7 | function replace(new_config) { |
7 | 8 | for (let key in new_config) { |
... | ... | @@ -9,6 +10,7 @@ function replace(new_config) { |
9 | 10 | } |
10 | 11 | |
11 | 12 | _removeIfNotExists(new_config); |
13 | + configFiller.do(); | |
12 | 14 | } |
13 | 15 | |
14 | 16 | function reload() { |
config.js
1 | 1 | "use strict"; |
2 | 2 | |
3 | 3 | const fs = require('fs'); |
4 | -const moment = require('moment'); | |
4 | +const configFiller = require('./config-filler'); | |
5 | 5 | |
6 | 6 | let configFile = process.cwd() + "/config.json"; |
7 | 7 | |
... | ... | @@ -13,7 +13,6 @@ if (!fs.existsSync(configFile)) { |
13 | 13 | } |
14 | 14 | |
15 | 15 | const config = require(configFile); |
16 | - | |
17 | -moment.locale(config.moment_locale || 'id'); | |
16 | +configFiller.do(); | |
18 | 17 | |
19 | 18 | module.exports = config; |