express-dot-doc

0.0.3 • Public • Published

express-dot-doc

Is your Express API documentation always out of date?

Usage

import express from 'express'
import expressDoc from 'express-dot-doc'

const app = express()
app.get('/ducks', () => {})
app.get('/pandas', () => {})
const opts = {path: '/api-documentation'}
expressDoc(app, opts)

app.listen(6505)

and go to http://localhost:6505/api-documentation

Opts

Property Explanation
path Documentation api path. Defaults to /api-documentation

How

Library uses app._router.stack to find routes registered to express server. This is the reason why you need to add expressDoc(app) after your routes.

Random thoughts

React is probably a bit heavy tool for rendering the response..!

Package Sidebar

Install

npm i express-dot-doc

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

3.48 kB

Total Files

4

Last publish

Collaborators

  • anttikon