Uzair Xlade Uzair Xlade - 1 month ago 16
Node.js Question

Swagger-ui local setup issue

I am trying to do local setup of swagger-ui, i am following this link Swagger-ui and following the instruction given in how to use it, i have download its zip file, installed nodejs package and tried to run the following commands mentioned there in the link,

1. npm Install
2. gulp


but as i run npm install it gives me error which is  Error Screen Shot 1  [ Error Screen Shot 1 ]

can you guide me how i can complete swagger-ui local environment setup.
by following above mentioned link.

Answer

There is really no reason to download and rebuild swagger-ui. It's probably easiest to grab one of the releases and run it in an http server:

  1. Download https://github.com/swagger-api/swagger-ui/archive/v2.1.4.zip
  2. unzip v2.1.4.zip
  3. cd swagger-ui-2.1.4\dist
  4. http-server .

This assumes you have installed http-server:

npm install -g http-server

then you can access swagger-ui at http://localhost:8080

Comments