aboutsummaryrefslogtreecommitdiffstats
path: root/src/nodejs/no1.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nodejs/no1.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nodejs/no1.js b/src/nodejs/no1.js
index 1132a11..fdf40e3 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);