Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ElemeFE/restc
A server-side middleware to visualize REST requests.
https://github.com/ElemeFE/restc
Last synced: about 1 month ago
JSON representation
A server-side middleware to visualize REST requests.
- Host: GitHub
- URL: https://github.com/ElemeFE/restc
- Owner: ElemeFE
- License: mit
- Created: 2016-11-07T10:25:55.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T23:32:59.000Z (about 2 years ago)
- Last Synced: 2024-10-15T10:02:23.825Z (about 2 months ago)
- Language: HTML
- Homepage: https://elemefe.github.io/restc/
- Size: 493 KB
- Stars: 1,355
- Watchers: 51
- Forks: 113
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-star - restc - side middleware to visualize REST requests. | ElemeFE | 1351 | (HTML)
README
## Introduction
restc is an HTTP server middleware, aiming to enhance debugging experience on RESTful APIs.
It can be easily integrated with popular HTTP frameworks. You will see:
- formatted JSON responses in the browser
- a debug panel with which you can send GET, POST, PUT, PATCH and DELETE requests directly in the browserYou can even share a request by sharing its URL directly to others and everything will be automatically filled in the panel.
## Getting Started
npm install --save restc
Use the middleware
```js
const restc = require('restc');
// for express
app.use(restc.express());
// for koa
app.use(restc.koa());
// ...and koa2
app.use(restc.koa2());
// for hapi
server.register(restc.hapi)
// for hapi of legacy version
server.register([{
register: restc.hapiLegacy
}], (err) => {
if (err) {
throw err
}
})
```