This commit is contained in:
Julian Lam
2014-02-14 11:49:16 -05:00
parent 734d8f96e8
commit d933e81b37
2 changed files with 15 additions and 3 deletions

View File

@@ -447,10 +447,15 @@ var async = require('async'),
}
},
save: function (server_conf, client_conf, callback) {
var serverConfigPath = path.join(__dirname, '../config.json');
if (nconf.get('config')) {
serverConfigPath = path.join(__dirname, '../', nconf.get('config'));
}
// Server Config
async.parallel([
function (next) {
fs.writeFile(path.join(__dirname, '../', 'config.json'), JSON.stringify(server_conf, null, 4), function (err) {
fs.writeFile(serverConfigPath, JSON.stringify(server_conf, null, 4), function (err) {
next(err);
});
},