
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
node-monkey
Advanced tools
A tool for inspecting, debugging and commanding Node applications through a web browser or SSH interface into your app
A tool for inspecting, debugging and commanding Node applications through a web browser or SSH interface into your app.
Node Monkey runs a simple server (or attaches to your existing server) and uses Socket.IO to create a websocket connection between the browser and server. Its primary feature captures anything that would normally be logged to the terminal and passes it to the browser for inspection.
The motivation for this project came from trying to debug a Node.js server I wrote that used websockets. I found it problematic trying to inspect objects with the terminal because the output was too large and not browsable. I tried using the built-in debugging that works with the Chrome Developer Tools plugin for Eclipse. Unfortunately, I ran into a problem where setting breakpoints to inspect objects would cause the server to stop responding to heartbeats thus causing the client to disconnect. This would entirely mess up my debugging efforts. All I really needed to do was have a good way to inspect objects.
I searched Google and found projects like node-inspector, which didn't work with the latest versions of Node, and node-codein which had many bugs. And neither worked with Firefox. So, Node Monkey was born!
npm install --save node-monkey
If you're interested in testing experimental and upcoming features, run this instead:
npm install --save node-monkey@next
Using NodeMonkey is designed to be extremely easy. All you have to do is include one line in your application. Anything that is logged to the console after this will show up in the browser console once connected.
It captures all output to console.log()
, console.warn()
and console.error()
.
let monkey = require('node-monkey')([options]);
// Do this if you want to bind to the console and have all output directed to the browser
// Pass `true` to disable server side logging and only see output in the browser
monkey.attachConsole()
When you start your app you will see the following output:
Node Monkey listening at http://0.0.0.0:50500
To connect your browser simply go to the address it shows in your web browser (http://0.0.0.0:50500
in this case). If you change the default host
and port
bindings or pass in your own server be sure to adjust your URL accordingly. It will prompt you for a username and password. Until you setup a user the default is guest
and guest
.
If you provide your own server you can view output in the console of your own web application instead. To see how to provide your own server check out the documentation.
<script type="text/javascript" src="http://0.0.0.0:50500/monkey.js"></script>
NOTE: You do NOT have to refresh the page when you restart your Node.js application to continue to receive output. Node Monkey will automatically reconnect.
Version 1.0.0-beta.1
FAQs
A tool for inspecting, debugging and commanding Node applications through a web browser or SSH interface into your app
The npm package node-monkey receives a total of 11 weekly downloads. As such, node-monkey popularity was classified as not popular.
We found that node-monkey demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.