Created
July 12, 2012 12:49
-
-
Save coderaiser/3097903 to your computer and use it in GitHub Desktop.
Cloud Commander SS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Piece of server.js code */ | |
/* https://github.com/coderaiser/cloudcmd/blob/44e96a63de3414cc71073f25c08588f6ed10cf2b/server.js */ | |
/* создаём сервер на порту 31337 */ | |
CloudServer.start=function() | |
{ | |
CloudServer.init(); | |
/* constant ports of deployng servers */ | |
var lCloudFoundryPort = process.env.VCAP_APP_PORT; | |
var lNodesterPort = process.env.app_port; | |
var lC9Port = process.env.PORT; | |
var http = require('http'); | |
http.createServer(CloudServer._controller).listen( | |
lC9Port || | |
lCloudFoundryPort || | |
lNodesterPort || | |
31337, | |
'0.0.0.0' || '127.0.0.1'); | |
console.log('Cloud Commander server running at http://127.0.0.1:' + | |
(!lC9Port? | |
(!lCloudFoundryPort? | |
(!lNodesterPort?31337:lNodesterPort) | |
:lCloudFoundryPort) | |
:lC9Port)); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment