socket.io-jstrace

jstrace middleware for socket.io

Usage no npm install needed!

<script type="module">
  import socketIoJstrace from 'https://cdn.skypack.dev/socket.io-jstrace';
</script>

README

socket.io-jstrace

jstrace middleware for socket.io

build status

Install

$ npm install --save socket.io-jstrace

Usage

var io = require('socket.io')()
  , trace = require('jstrace')
  , siotrace = require('socket.io-jstrace')
  
io.use(siotrace({
  trace: trace
}))

io.on('connection', function(socket) {
  
})

Probes

  • socket.io:connection:start socket connected
  • socket.io:connection:end socket disconnected

Tests

$ npm test

Coverage

$ npm run cover

License

MIT