2022-10-22 17:19:39 +08:00
|
|
|
let _ = require('lodash');
|
|
|
|
let fs = require('fs');
|
2022-02-09 03:32:03 +08:00
|
|
|
const settings = require('./settings');
|
2022-10-22 17:19:39 +08:00
|
|
|
const LOCAL_SETTINGS_FILE_PATH = '/etc/bigbluebutton/bbb-export-annotations.json';
|
|
|
|
|
2022-02-09 03:32:03 +08:00
|
|
|
const config = settings;
|
2022-10-22 17:19:39 +08:00
|
|
|
|
|
|
|
if (fs.existsSync(LOCAL_SETTINGS_FILE_PATH)) {
|
|
|
|
const local_config = JSON.parse(fs.readFileSync(LOCAL_SETTINGS_FILE_PATH));
|
|
|
|
_.mergeWith(config, local_config, (a, b) => (_.isArray(b) ? b : undefined));
|
|
|
|
}
|
|
|
|
|
2022-02-09 03:32:03 +08:00
|
|
|
module.exports = config;
|