Last active
August 29, 2015 14:02
-
-
Save IvanGuardado/5290e145e74fcc41a733 to your computer and use it in GitHub Desktop.
Node.js, The Bad Parts
This file contains 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
var cluster = require('cluster'); | |
var cpus = require('os').cpus().length; | |
if (cluster.isMaster) { | |
// Fork workers. | |
for (var i = 0; i < cpus; i++) { | |
cluster.fork(); | |
} | |
} | |
// .... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment