added custom config option
This commit is contained in:
		
							parent
							
								
									b69b6a31b3
								
							
						
					
					
						commit
						7e6f81cd10
					
				
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@ -2,6 +2,7 @@
 | 
			
		||||
*/**/.DS_Store
 | 
			
		||||
node_modules
 | 
			
		||||
npm-debug.log
 | 
			
		||||
config.js
 | 
			
		||||
*~
 | 
			
		||||
*.swp
 | 
			
		||||
*.pem
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										7
									
								
								app.js
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								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);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,9 @@ var config = {
 | 
			
		||||
	type: 'C++',
 | 
			
		||||
	os: 'linux',
 | 
			
		||||
	rpcHost: 'localhost',
 | 
			
		||||
	rpcPort: '8080'
 | 
			
		||||
	rpcPort: '8080',
 | 
			
		||||
	serverHost: 'localhost',
 | 
			
		||||
	serverPort: '3000'
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
module.exports = config;
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user