How to install Swagger on Ubuntu
15,256
Solution 1
- install node and npm, you just download node.tar.gz file,can scan node official website, https://nodejs.org/en/download/current/
- unrar this file,and set global parms for npm and node,if node -v and npm -v has result,it shows you succeed
npm install -g http-server
git clone https://github.com/swagger-api/swagger-editor.git
http-server -p 8080 swagger-editor
- then you can access http:127.0.0.1:8080 view swagger!!! hope can help you !remember give me a good evaluation!
Solution 2
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/
Related videos on Youtube
Author by
satheesh
Updated on September 16, 2022Comments
-
satheesh over 1 year
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.
-
Helen over 6 yearsWhich one of the Swagger projects are you trying to install?
-
satheesh over 6 yearsi tried sudo also
-
-
bcag2 over 4 yearsAs I have already lamp server running, I run container with: docker run -d -p 8080:8080 swaggerapi/swagger-editor to avoid error
-
rugby2312 about 2 yearsIf you want to pass an existing
swagger.json
to the container , remember to do the folder mapping and declare the file name as a variabledocker run -d -p 8080:8080 -v /home/ubuntu/dswagger:/tmp -e SWAGGER_FILE=/tmp/swagger.json swaggerapi/swagger-editor