Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

is the swagger-ui automatically included ? #596

Open
walshe opened this issue Apr 11, 2020 · 0 comments
Open

is the swagger-ui automatically included ? #596

walshe opened this issue Apr 11, 2020 · 0 comments

Comments

@walshe
Copy link

walshe commented Apr 11, 2020

Hi, I used swagger-node to generate an express app - nice.. but now I would like to get the swagger-ui (for my apps api) also integrated in my running app e.g. at /api-docs

I tried the following, which displays the ui at root but it is pointing to some external pet store api.

any help is appreciated thanks

const pathToSwaggerUi = require('swagger-ui-dist').absolutePath()
var express = require('express')

var app = express();

app.use(express.static(pathToSwaggerUi))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant