1.2.4 • Published 11 months ago
@errikrose/docs v1.2.4
@errikrose/docs
A Node.js module that sets up a Swagger UI documentation route in an Express.js application. This module uses a pre-defined swagger.json
file included in the package.
Installation
To install the package, use the following npm command:
npm install @errikrose/docs
Usage
First, import the module in your Express.js application:
javascript const express = require('express'); const docs = require('@errikrose/docs');
Then, use the module to set up a Swagger UI documentation route:
app.use('/api-docs', docs());
In the above, visiting http://localhost:3000/api-docs
(or replace localhost:3000
with your server's address and port) in a web browser will display the Swagger UI documentation page.
License
This package is licensed under the ISC License.