Created
January 2, 2012 16:54
-
-
Save mmalecki/1551356 to your computer and use it in GitHub Desktop.
New `haibu-carapace` API
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
| var fork = require('child_process').fork; | |
| var c = fork('bin/carapace', ['examples/chroot-jail/server.js']); | |
| c.on('message', function (data) { | |
| console.log('Received a message from carapace'); | |
| console.dir(data); | |
| if (data.event == 'port') { | |
| console.log([ | |
| 'Server is listening on port ' + data.data.port, | |
| '(It wanted to listen on ' + data.data.desired + ')' | |
| ].join('\n')); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment