diff --git a/.gitignore b/.gitignore index 48f303e..e7156bc 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ */**/.DS_Store node_modules npm-debug.log +config.js *~ *.swp *.pem diff --git a/app.js b/app.js index 30cf339..3683a12 100644 --- a/app.js +++ b/app.js @@ -1,11 +1,16 @@ var express = require('express.io'); var path = require('path'); var fs = require('fs'); +var config; var app = express(); app.http().io(); -var config = require('./config'); +if(fs.existsSync('./config.js')){ + config = require('./config'); +} else { + config = require('./config.default'); +} var node = new require('./lib/node')(config); diff --git a/config.js b/config.default.js similarity index 63% rename from config.js rename to config.default.js index 8a24922..d5427c8 100644 --- a/config.js +++ b/config.default.js @@ -3,7 +3,9 @@ var config = { type: 'C++', os: 'linux', rpcHost: 'localhost', - rpcPort: '8080' + rpcPort: '8080', + serverHost: 'localhost', + serverPort: '3000' }; module.exports = config; \ No newline at end of file