Skip to content
This repository has been archived by the owner on May 19, 2019. It is now read-only.

langpavel/node-connect-repl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-connect-repl

Inject REPL into connect/express as middleware.

Middleware is loaded only in environment other than production

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 stop request
  • 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.

Example

var express = require('express');
var app = express();

// ...
app.use(require('connect-repl')());

// some routes...

app.listen(3000);

About

Inject REPL into connect/express as middleware

Resources

Stars

Watchers

Forks

Packages

No packages published