testing out mon
Created
April 25, 2012 22:36
-
-
Save jgallen23/2494031 to your computer and use it in GitHub Desktop.
Mon tests
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
server.pid |
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
Server running at http://127.0.0.1:1337/ | |
mon : pid 65842 | |
mon : write pid to server.pid | |
mon : shutting down | |
Server running at http://127.0.0.1:1337/ | |
Server running at http://127.0.0.1:1337/ | |
Server running at http://127.0.0.1:1337/ | |
Server running at http://127.0.0.1:1337/ | |
Server running at http://127.0.0.1:1337/ | |
node.js:201 | |
throw e; // process.nextTick error, or 'error' event on first tick | |
^ | |
Error: listen EADDRINUSE | |
at errnoException (net.js:670:11) | |
at Array.0 (net.js:771:26) | |
at EventEmitter._tickCallback (node.js:192:40) | |
Server running at http://127.0.0.1:1337/ | |
node.js:201 | |
throw e; // process.nextTick error, or 'error' event on first tick | |
^ |
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
Server running at http://127.0.0.1:1337/ | |
mon : pid 65615 | |
mon : write pid to server.pid | |
mon : shutting down |
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
#!/usr/bin/env bash | |
kill -s SIGKILL $(cat server.pid) |
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 http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World\n'); | |
}).listen(1337, '127.0.0.1'); | |
console.log('Server running at http://127.0.0.1:1337/'); |
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
#!/usr/bin/env bash | |
mon -d "node server" -p server.pid -l log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment