Skip to content

Instantly share code, notes, and snippets.

@Sebmaster
Created February 18, 2011 22:32
Show Gist options
  • Save Sebmaster/834539 to your computer and use it in GitHub Desktop.
Save Sebmaster/834539 to your computer and use it in GitHub Desktop.
var createServer = require('net').createServer,
Buffer = require('buffer').Buffer,
cluster = require('cluster'),
fs = require('fs');
cluster(createServer(function(conn) {
fs.writeFileSync('~/foo.txt', 'var');
}))
.set('workers', 1)
.listen(8000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment