@soluzioni-futura/docs-helper
v1.0.11
Published
Run the following command: ```sh $ npm i @soluzioni-futura/docs-helper ```
Downloads
88
Keywords
Readme
Setup
Run the following command:
$ npm i @soluzioni-futura/docs-helper
Usage
import { OpenAPIV3 }, DocsHelperRouter from "@soluzioni-futura/docs-helper"
import definition from "./definition.json"
import express from "express"
const app = express()
/* ... */
app.use(DocsHelperRouter({
definition: definition as OpenAPIV3.Document,
endpoint: "/docs"
}))
app.listen(8000, () => {
console.log("App is listening on port 8000!")
})
Check http://localhost:8000/docs
The definition can be provided by local path