Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/isayme/node-repl-over-http
A repl tool over HTTP(s)
https://github.com/isayme/node-repl-over-http
nodejs repl
Last synced: 12 days ago
JSON representation
A repl tool over HTTP(s)
- Host: GitHub
- URL: https://github.com/isayme/node-repl-over-http
- Owner: isayme
- License: mit
- Created: 2018-03-24T07:46:31.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-13T15:20:18.000Z (almost 6 years ago)
- Last Synced: 2024-11-19T12:20:53.034Z (about 1 month ago)
- Topics: nodejs, repl
- Language: JavaScript
- Size: 136 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# REPL over HTTP(s)
[![Build Status](https://travis-ci.org/isayme/node-repl-over-http.svg?branch=master)](https://travis-ci.org/isayme/node-repl-over-http)
[![Coverage Status](https://coveralls.io/repos/github/isayme/node-repl-over-http/badge.svg?branch=master)](https://coveralls.io/github/isayme/node-repl-over-http?branch=master)A repl tool over HTTP(s)
## Use as a middleware
> npm i repl-over-httpClick [here](./example/server.js) for a full example.
```
const express = require('express')
const replOverHttp = require('repl-over-http')const app = express()
const middleware = replOverHttp() // create a `function (req, res)` middleware
app.put('/repl', middleware)
app.listen(8081)
```## Use as a cli
> npm i -g repl-over-http> repl-cli --uri http://your-repl-host
### Screenshot
![screenshot](./screenshot.gif)### note about curl
We can connect server with cmd `curl -sNT. http://localhost:8081/repl`.But if reponse from server too large, curl will crash ~
## How it works
refer [Running a node.js REPL over `curl`](https://gist.github.com/TooTallNate/2053342)![how-it-works](./how-it-works.png)
## Security
For security reason, we only allow request from localhost by default. Custom with option `preflight`.