mumbler
send all those console.log through socket.io on any endpoint, you know,
just to keep an eye on things...
Note
I built it just to experiment but then I thought someone could benefit from it.
Rememeber: I didn't fully test the package, I got it to work on a simple
Express and a Restify one.
This package HAS NOT BEEN THOROUGHLY TESTED, USAGE ON PRODUCTION IS,
THEREFORE, NOT RECOMMENDED
The main purpose is just for development as the package does not
enforce any security and it will send any stdout
data to
connected clients on the designated endpoint.
Install
npm install mumbler --save
Usage with Express
var mumbler = require('mumbler')
app.get('/mumbler', mumbler(http));
http.listen(3000, function(){
console.log('Open http://localhost:3000/mumbler on your browser')
});
setInterval(function(){console.log(new Date())}, 1000)
Usage with Restify
Restify usually keeps a reference to the http server instance on
server.server
. Remember, this hasn't been fully tested, I built this
just to check on my own developments and then decided it could be
useful for someone else.
var restify = require('restify')
var server = restify.createServer()
server.get('/mumbler', require('mumbler')(server.server))