Skip to content

Instantly share code, notes, and snippets.

@jgallen23
Created April 25, 2012 22:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgallen23/2494031 to your computer and use it in GitHub Desktop.
Save jgallen23/2494031 to your computer and use it in GitHub Desktop.
Mon tests

testing out mon

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
^
Server running at http://127.0.0.1:1337/
mon : pid 65615
mon : write pid to server.pid
mon : shutting down
#!/usr/bin/env bash
kill -s SIGKILL $(cat server.pid)
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/');
#!/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