简体   繁体   English

如何在 Ubuntu 上安装 Swagger

[英]How to install Swagger on Ubuntu

I want to install Swagger on Ubuntu.我想在 Ubuntu 上安装 Swagger。 I am new to swagger.我是大摇大摆的新手。 I want to do some api documentation by using swagger.我想通过使用 swagger 来做一些 api 文档。 For that what are things i need to install on my machine?为此,我需要在我的机器上安装哪些东西? Please send me the information as soon as possible.请尽快把资料发给我。

  1. install node and npm, you just download node.tar.gz file,can scan node official website, https://nodejs.org/en/download/current/安装node和npm,下载node.tar.gz文件,可以扫描node官网, https: //nodejs.org/en/download/current/
  2. unrar this file,and set global parms for npm and node,if node -v and npm -v has result,it shows you succeed解压此文件,并为 npm 和 node 设置全局参数,如果 node -v 和 npm -v 有结果,则表明您成功
  3. npm install -g http-server
  4. git clone https://github.com/swagger-api/swagger-editor.git
  5. http-server -p 8080 swagger-editor
  6. then you can access http:127.0.0.1:8080 view swagger!!!然后就可以访问http:127.0.0.1:8080 查看swagger!!! hope can help you !remember give me a good evaluation!希望能帮到你!记得给我好评哦!

If you are using docker, simply pull and run the swaggerapi/swagger-editor如果您使用的是docker ,只需拉取并运行swaggerapi/swagger-editor

docker pull swaggerapi/swagger-editor
docker run -p 80:8080 swaggerapi/swagger-editor

Open your browser to http://localhost:80/打开浏览器访问http://localhost:80/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM