code-pump
Live develop your nodejs app and inspect its state, from a nodejs-workspace in Lively Web!
nodejs code injection, extraction, and evaluation. Can evaluate in the context of modules by using lively.vm.
Also supports nodejs process creation for "workspace processes". Controlled either directly via the evaluator / process interfaces or via websockets. Ws server is part of the package.
Usage
Option 1: start code-pump from the command line
npm install code-pump --save-dev
PATH=$(npm bin):$PATH code-pump localhost:9004
- In Lively, open a nodejs-workspace, click on the red "disconnected" button, and enter ws://localhost:9004
Option 2: start code-pump with your nodejs app
start"localhost" 9004 console;;
Then connect as in 3. above.
API
evaluator
Given a file some-module.js
in the base directory of your app that includes
var internalState = of: module: 23;
you can access it via
var e = evaluator;e; // => 23
child process
var p = process;p;
websockets
If you want your own client then setup a server like above
start"localhost" 9004 console;;
In your client (nodejs or browser) run
var ws = "ws://localhost:9004/";ws;ws;
License
MIT