Commit 26944a18 authored by Andrew Danger Lyon's avatar Andrew Danger Lyon

changing (simplifying) how config/init works.

/
parent 0ca16365
const config = {};
exports.config = config;
exports.init = function(configdir) {
Object.assign(config, require(configdir+'/default'), require(configdir+'/local'));
exports.init = function(configdata) {
Object.assign(config, configdata);
};
......@@ -4,9 +4,9 @@ const protobuf = require('./helpers/protobuf');
const models = {};
let has_init = false;
exports.init = function(configdir) {
exports.init = function(configdata) {
if(has_init) return;
config.init(configdir);
config.init(configdata);
protobuf.load();
const modeldir = __dirname + '/models';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment