https://github.com/unitech/express-repl
Interact with express internal data (routes, settings...) with an auto reconnect remote repl
https://github.com/unitech/express-repl
Last synced: 10 months ago
JSON representation
Interact with express internal data (routes, settings...) with an auto reconnect remote repl
- Host: GitHub
- URL: https://github.com/unitech/express-repl
- Owner: Unitech
- Created: 2013-04-02T15:20:51.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2015-03-24T04:31:07.000Z (almost 11 years ago)
- Last Synced: 2025-02-23T00:05:06.714Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 140 KB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Express remote REPL
Remote REPL with infinite connection (can be used with supervisor)
## Usage
In the app.js :
```
require('express-repl')(app);
```
Connect to repl :
```
./bin/repl
```
Commands :
```
app
routes
```
## Example
```
var express = require('express')
, http = require('http');
var app = express();
app.configure(function(){
app.set('port', process.env.PORT || 3000);
});
app.get('/', function(req, res) {
res.send('Ok');
});
// Activate remote repl
require('express-repl')(app);
http.createServer(app).listen(app.get('port'), function(){
console.log("Express server listening on port " + app.get('port'));
});
```