1.0.2 • Published 1 year ago

@gorvok/docs v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago
  1. Easy integration with Express applications
  2. Serves Swagger UI documentation at a specified route
  3. Supports Swagger JSON configurations
npm install @gorvok/docs

1. Import the package First, require '@gorvok/docs' in your Express app:

const setupDocs = require('@gorvok/docs');

2. Initialize Swagger UI Documentation Use the imported function to add Swagger UI documentation to your application. Typically, you'd do this after setting up your middleware but before defining any routes:

const express = require('express');
const app = express();

// Setup Swagger documentation
setupDocs(app);

// Your routes here
app.get('/', (req, res) => res.send('Hello World!'));

const port = process.env.PORT || 3000;
app.listen(port, () => console.log(`Listening on port ${port}...`));

By default, the documentation will be served at /api-docs.

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago