Inject REPL as Connect or Express middleware
Want to see pretty graphs? Log in now!
npm install connect-repl
|9||downloads in the last week|
|19||downloads in the last month|
|Version||0.0.4 last updated 2 years ago|
|Keywords||repl, connect, express, middleware, debug, interactive|
Inject REPL into connect/express as middleware.
Middleware is loaded only in environment other than
Following is exported into REPL:
last_req-- last request object
last_res-- last response object
stop-- boolean. Set to true if you want "set breakpoint" in next request
next-- function. Call if you want to continue after
req-- current request object when stopped
res-- current response object when stopped
REPL_EXPORT global function
Module exports global function
REPL_EXPORT(name, value) which can be called anywhere.
Provided value is accesible by
name in REPL.
var express = require('express'); var app = express(); // ... app.use(require('connect-repl')()); // some routes... app.listen(3000);