added custom config option

This commit is contained in:
cubedro 2015-02-12 04:55:09 +02:00
parent b69b6a31b3
commit 7e6f81cd10
3 changed files with 10 additions and 2 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
*/**/.DS_Store
node_modules
npm-debug.log
config.js
*~
*.swp
*.pem

7
app.js
View File

@ -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);

View File

@ -3,7 +3,9 @@ var config = {
type: 'C++',
os: 'linux',
rpcHost: 'localhost',
rpcPort: '8080'
rpcPort: '8080',
serverHost: 'localhost',
serverPort: '3000'
};
module.exports = config;