express-repl-toolkit
Handy tools to play with express 4+ based apps in repl. Should also work with things like loopback :)
Useage:
var app = ; // Should work also with express-based framewroks like loopback.var replServer = app;
Then when you run node <YOUR_SERVER_SCRIPT>
you'll got a express.js attached to the repl as app :).
Then explore the app instance in your terminal .
Or you can wrap it with something like this:
var replFlag = processargvlength;if replFlag var replServer = app;
Tools:
Type help
in repl to list available commands,
Currently available commands:
tm - Trace middleware mounted in the system.
tr("[METHOD] /PATH") - Trace route, method default to GET if not provided.
lr - List routes of mounted on current app recursively.
catchReq - Capture next request as reference, then you can explore it in repl console.
Work in progress. Welcome for new suggestions.
Try:
npm start
or node example --repl