Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mumbler

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mumbler - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

16

lib/index.js

@@ -1,3 +0,3 @@

var iof = require('socket.io');
var intercept = require('./interceptor')
var socket_io = require('socket.io');
var intercept = require('intercept-stdout')
var path = require('path')

@@ -7,10 +7,12 @@ var fs = require('fs')

function mumbler (http) {
var io = iof(http)
var io = socket_io(http)
var nsp = io.of('/mumbler-io')
var unhook_intercept = intercept(
function(txt) {
io.emit('log', txt)
nsp.emit('log', txt)
},
function(txt) {
nsp.emit('log', txt)
}
// , function(txt) {
// io.emit('log', txt)
// }
);

@@ -17,0 +19,0 @@

@@ -17,3 +17,3 @@ // Borrowed from intercept-stdout

module.exports = function (stdoutIntercept, stderrIntercept) {
// stderrIntercept = stderrIntercept || stdoutIntercept
stderrIntercept = stderrIntercept || stdoutIntercept

@@ -20,0 +20,0 @@ var old_stdout_write = process.stdout.write

{
"name": "mumbler",
"version": "0.2.0",
"version": "0.3.0",
"description": "send stdout through socket.io",

@@ -13,7 +13,9 @@ "main": "index.js",

"dependencies": {
"intercept-stdout": "^0.1.2",
"socket.io": "^2.0.3"
},
"devDependencies": {
"debug": "^2.6.8",
"express": "^4.15.3"
}
}
# mumbler
send all those console.log through socket.io on any endpoint, you know,
send all those `console.log` outputs through socket.io on any endpoint, you know,
just to keep an eye on things...
**Mumbler** will intercept `stdout`/`stderr` and send it through a socket.io connection.
# Do NOT USE WITH `DEBUG=*`
It just explodes, trust me.
## Note
I built it just to experiment but then I thought someone could benefit from it.
I built Mumbler just to experiment with, 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.
**Remember**: I didn't fully test the package, I got it to work on both a simple
Express app and a Restify one.

@@ -15,5 +22,6 @@ This package **HAS NOT BEEN THOROUGHLY TESTED, USAGE ON PRODUCTION IS,

The main purpose is just for development as the package **does not
enforce any security** and it will send any `stdout` data to
enforce any security** and it will send any `stdout`/`stderr` data to
connected clients on the designated endpoint.
## Install

@@ -24,2 +32,3 @@ ```bash

## Usage with Express

@@ -40,2 +49,3 @@ ```javascript

## Usage with Restify

@@ -47,4 +57,5 @@ Restify _usually_ keeps a reference to the http server instance on

```javascript
var restify = require('restify')
//crate the http server
var restify = require('restify')
// create the http server
var server = restify.createServer(/* some config here */)

@@ -51,0 +62,0 @@

@@ -1,9 +0,10 @@

var mumbler = require('../')
var app = require('express')();
var http = require('http').Server(app);
var mumbler = require('../')
var debug = require('debug')('mumbler:test')
// attach to some endpoint
app.get('/mumbler', mumbler(http));
http.listen(3000, function(){

@@ -14,4 +15,5 @@ console.log('Open http://localhost:3000/mumbler on your browser')

// spit some output constantly so we can check output
setInterval(function(){
setInterval(function() {
console.log(new Date())
debug(new Date())
}, 1000)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc