swagger-editor 本地部署到
from:http://blog.****.net/helloworld94/article/details/51729466
github 上的swagger-editor:https://github.com/swagger-api/swagger-editor,作为参考
按照github上的方法,没有尝试成功。直接download下来解压文件,提示少了个bundle.js。崩溃啊。
但是=======这是一个华丽的转折
使用npm安装就有这个文件了
cmd下 :npm install swagger-editor(等了好一会)
npm install http-server
cmd下 进入带有http-server.cmd的目录下
像我的就是 cd D:\Program Files\nodejs\node_global,之后 http-server C:\Users\Administrator\node_modules\swagger-editor(npm安装swagger-editor的swagger-editor这个目录)
出现以下界面大功告成!!!
这时候只需要运行 http://localhost:8080/ 就可以了
ps:如果遇到8080端口冲突报错,请自行百度关闭冲突端口