Is your Express API documentation always out of date?
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
Property | Explanation |
---|---|
path | Documentation api path. Defaults to /api-documentation |
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.
React is probably a bit heavy tool for rendering the response..!