Skip to content

Instantly share code, notes, and snippets.

@othiym23
Last active December 23, 2015 23:29
Show Gist options
  • Save othiym23/6710163 to your computer and use it in GitHub Desktop.
Save othiym23/6710163 to your computer and use it in GitHub Desktop.
var domain = require('domain');
var key = process.addAsyncListener(domain.____xXx__secret___asyncListener);
var d = domain.create();
d.on('error', ...);
d.run(function () {
var server = net.createServer(...);
});
process.removeAsyncListener(key);
server.listen(8000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment