How to install Swagger on Ubuntu

Viewed 18830

I want to install Swagger on Ubuntu. I am new to swagger. I want to do some api documentation by using swagger. For that what are things i need to install on my machine? Please send me the information as soon as possible.

2 Answers
  1. install node and npm, you just download node.tar.gz file,can scan node official website, 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
  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!!! hope can help you !remember give me a good evaluation!

If you are using docker, simply pull and run the swaggerapi/swagger-editor

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

Open your browser to http://localhost:80/

Note, make sure your browser does not silently redirect to https://localhost:80/

Related