Skip to content

Instantly share code, notes, and snippets.

@rudyjahchan
Created February 28, 2014 18:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rudyjahchan/9276981 to your computer and use it in GitHub Desktop.
Save rudyjahchan/9276981 to your computer and use it in GitHub Desktop.
if (cluster.isMaster)
cluster.fork() for i in [0...numCPUs]
else
@server = http.createServer(@onRequest)
@io = socketio.listen(@server, collectedOptions)
@io.sockets.on 'connection', @onConnection
@server.listen @port, cb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment