Commit f9321212 authored by mercury233's avatar mercury233

nconf name

parent 69d2c26d
......@@ -24,13 +24,14 @@ moment = require 'moment'
#配置
nconf = require 'nconf'
nconf.file('./config.user.json')
nconf.file('user', './config.user.json')
#nconf.file('user2', './config.user2.json')
defaultconfig = require('./config.json')
nconf.defaults(defaultconfig)
settings = global.settings = nconf.get()
nconf.myset = (settings, path, val) ->
nconf.set(path, val)
nconf.save()
nconf.save('user')
log.info("setting changed", path, val)
path=path.split(':')
if path.length == 0
......
......@@ -36,7 +36,7 @@
nconf = require('nconf');
nconf.file('./config.user.json');
nconf.file('user', './config.user.json');
defaultconfig = require('./config.json');
......@@ -47,7 +47,7 @@
nconf.myset = function(settings, path, val) {
var key, target;
nconf.set(path, val);
nconf.save();
nconf.save('user');
log.info("setting changed", path, val);
path = path.split(':');
if (path.length === 0) {
......
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