src/core/base/wnConsole.js
function (serverPath,relativeMainPath)
		{
			if (relativeMainPath)
				serverPath = path.relative(cwd,path.resolve(mainPath,serverPath));

			var serverConfig = {},
				consoleID = this.getServerModules().length+1;
				serverConfig[consoleID] = { 'modulePath': serverPath, 'serverID': consoleID };

			this.e.log('[*] Building wnServer from `'+serverPath+'`');

			if (!fs.existsSync(this.modulePath+serverPath))
			{
				this.e.log('[*] Failed to load wnServer from path.');
				return false;
			}
		
			this.setServers(serverConfig);
			var server = this.createServer(consoleID);

			this.selectServer(consoleID);

			return server;
		}
function (serverPath,relativeMainPath)
		{
			if (relativeMainPath)
				serverPath = path.relative(cwd,path.resolve(mainPath,serverPath));

			var serverConfig = {},
				consoleID = this.getServerModules().length+1;
				serverConfig[consoleID] = { 'modulePath': serverPath, 'serverID': consoleID };

			this.e.log('[*] Building wnServer from `'+serverPath+'`');

			if (!fs.existsSync(this.modulePath+serverPath))
			{
				this.e.log('[*] Failed to load wnServer from path.');
				return false;
			}
		
			this.setServers(serverConfig);
			var server = this.createServer(consoleID);

			this.selectServer(consoleID);

			return server;
		}
function ( serverPath , relativeMainPath ) { if ( relativeMainPath ) serverPath = path . relative ( cwd , path . resolve ( mainPath , serverPath ) ) ; var serverConfig = { } , consoleID = this . getServerModules ( ) . length + 1 ; serverConfig [ consoleID ] = { 'modulePath' : serverPath , 'serverID' : consoleID } ; this . e . log ( '[*] Building wnServer from `' + serverPath + '`' ) ; if ( ! fs . existsSync ( this . modulePath + serverPath ) ) { this . e . log ( '[*] Failed to load wnServer from path.' ) ; return false ; } this . setServers ( serverConfig ) ; var server = this . createServer ( consoleID ) ; this . selectServer ( consoleID ) ; return server ; }
Create a new wnServer and puts under the management of this console
@param $serverPath server module path
@param $relativeMainPath boolean relative to mainPath
Create a new wnServer and puts under the management of this console