问题标签 [swagger-jsdocs]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
node.js - SwaggerJSDoc:找不到本地主机:3000
我对 SwaggerJSDoc 有疑问。我已经安装了它并遵循了文档(参考:https ://github.com/Surnet/swagger-jsdoc )。
这是我的配置文件:
在我的/src
文件夹中,我放置了一些名为的嵌套文件夹docs
,其中包含.yaml
描述各种 api 的文件。如果我console.log
保持不变,我可以看到所有这些文件的内容,openapiSpecification
以便该部分正常工作。
这是我app.ts
归档的地方:
问题是,当我运行服务器时,localhost:3000/docs
出现错误:
我怎样才能解决这个问题?