New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

express-swagger-ui-router

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-swagger-ui-router

Serve swagger-ui and a local configuration file with express.js (without hacking `node_modules/swagger-ui/dist/index.html`)

  • 2.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-94.44%
Maintainers
1
Weekly downloads
 
Created
Source

express-swagger-ui-router NPM version

Cleanly serve swagger-ui and a local openapi configuration file.

Installation

npm install --save express-swagger-ui-router
# Install peer dependencies
npm install --save swagger-ui express 

Usage

This module exports a single function with a configFile parameter which takes the path to a local openapi configuration file. It returns an express.Router instance which can be mounted at any desired path.

import express from 'express';
import path from 'path';
import swaggerServer from 'express-swagger-ui-router';

const app = express();

app.use('/swagger',
  swaggerServer({ configFile: path.resolve(__dirname, 'openapi.json') }));

app.listen(3000);

// Access swagger-ui at localhost:3000/swagger

Keywords

FAQs

Package last updated on 04 Jul 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc