Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

redoc-express

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redoc-express

Express Middleware for OpenAPI/Swagger-generated API Reference Documentation

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
16K
-68.45%
Maintainers
1
Weekly downloads
 
Created
Source

redoc-express

Express Middleware for OpenAPI/Swagger-generated API Reference Documentation

Build Status code style: prettier npm contributions welcome License: MIT

Demo

  • Live Demo

Install

npm install redoc-express

Usage

const express = require('express');
const redoc = require('redoc-express');

const app = express();
const port = 3000;

// serve your swagger.json file
app.get('/docs/swagger.json', (req, res) => {
  res.sendFile('swagger.json', { root: '.' });
});

// define title and specUrl location
// serve redoc
app.get(
  '/docs',
  redoc({
    title: 'API Docs',
    specUrl: '/docs/swagger.json'
  })
);

app.listen(port, () => console.log(`Example app listening on port ${port}!`));

Development

Install Dependencies

npm i

Run Test

npm t

Check ReDoc Project for more INFO

License

MIT © Aung Myo Kyaw

Keywords

redoc-swagger-ui-express-middleware

FAQs

Package last updated on 03 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts