Swagger-ui-middleware
Express Helper to ship swagger-ui explorer
🗺️
const express = require('express');
const createSwaggerUiMiddleware = require('@coorpacademy/swagger-ui-express');
const app = express();
app.use(
createSwaggerUiMiddleware({
swaggerDoc: require('./swagger.json'),
apiDocs: '/api-docs',
swaggerUi: '/explorer',
indexPath: 'index.html'
})
);
app.listen(8000);
Open http://localhost:8000/explorer