diff options
Diffstat (limited to '')
-rw-r--r-- | src/nodejs/no1.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nodejs/no1.js b/src/nodejs/no1.js index 7be26a4..7fcdf93 100644 --- a/src/nodejs/no1.js +++ b/src/nodejs/no1.js @@ -5,7 +5,21 @@ var builder = require('xmlbuilder'); var config = require('./config.json'); +// load config +process.argv.forEach( + function (val,index, array){ + if(val=="-c"){ + path = array[index+1]; + console.log(path[0]); + if( path[0] != '/'){ + path = __dirname + '/' + path; + } + config = require(path); + } + }); + var connectionString = config['connectionString']; + console.log("server starting..."); console.log("Connection String: " + connectionString); |