bigbluebutton-Github/bbb-export-annotations/config/index.js

14 lines
433 B
JavaScript
Raw Normal View History

let _ = require('lodash');
let fs = require('fs');
2022-02-09 03:32:03 +08:00
const settings = require('./settings');
const LOCAL_SETTINGS_FILE_PATH = '/etc/bigbluebutton/bbb-export-annotations.json';
2022-02-09 03:32:03 +08:00
const config = settings;
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;