0.0.1 • Published 7 years ago
monitor-sockets v0.0.1
monitor-sockets
Monitor socket connections in Node.js
Installation
yarn add monitor-socketsUse
// In your application index.js file before starting the server
const monitor = require("monitor-sockets");
monitor.start({ interval: 2000 });
// Renders the table on the terminal
┌────────────────┬─────────┬────────┬──────────┬─────────┬───────────┬───────┐
│ Socket Name    │ Created │ In Use │ Requests │ Timeout │ Destroyed │ Error │
├────────────────┼─────────┼────────┼──────────┼─────────┼───────────┼───────┤
│ localhost:8082 │ 20      │ 0      │ 0        │ 0       │ 0         │ 20    │
├────────────────┼─────────┼────────┼──────────┼─────────┼───────────┼───────┤
│ localhost:8085 │ 20      │ 0      │ 0        │ 0       │ 0         │ 20    │
├────────────────┼─────────┼────────┼──────────┼─────────┼───────────┼───────┤
│ localhost:8086 │ 20      │ 0      │ 0        │ 0       │ 0         │ 20    │
└────────────────┴─────────┴────────┴──────────┴─────────┴───────────┴───────┘API
start(options)
Starts monitoring the socket connections for both HTTP and HTTPS.
- options{Object}- interval- Refresh interval to update the data on the Terminal
 
LICENSE
MIT
0.0.1
7 years ago