Forum Discussion
ponelat
2 years agoStaff
asaddev I'm not sure what else you have on your stack, nor why your browser is showing the raw HTML.
Some things you can follow up on.
See if the redirect URL has a different content-type (since /api-docs redirects to /api-docs/, note the trailing slash)
curl -iL http://localhost:3000/api-docs/
# Content-Type?
And for completeness you can try with the following versions...
"dependencies": {
"express": "^4.18.2",
"swagger-ui-express": "^4.6.2"
}
Node: v18.7.0.
Tested with/without es6 imports (try without, using the minimal example above).
Related Content
- 3 years ago
- 3 years ago
Recent Discussions
- 2 days ago