diff options
-rw-r--r-- | src/nodejs/config.json | 1 | ||||
-rw-r--r-- | src/nodejs/no1.js | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/nodejs/config.json b/src/nodejs/config.json new file mode 100644 index 0000000..1025c5b --- /dev/null +++ b/src/nodejs/config.json @@ -0,0 +1 @@ +exports.connectionString = "pg://user:password@host/database"; diff --git a/src/nodejs/no1.js b/src/nodejs/no1.js index 6c6809e..1132a11 100644 --- a/src/nodejs/no1.js +++ b/src/nodejs/no1.js @@ -1,9 +1,13 @@ var clutch = require('clutch'); -var pg = require('pg') -var builder = require('xmlbuilder') +var pg = require('pg'); +var builder = require('xmlbuilder'); +var config = require('./config.json'); -var connectionString = "pg://user:password@host/database"; + +var connectionString = config['connectionString']; +console.log("server starting..."); +console.log("Connection String: " + connectionString); function toISO8601(date) { //2007-03-31T00:09:22+01:00 |