Hello,
I need some help. I am not able to install swagger editor locally.
This is the link I am referring,
https://github.com/swagger-api/swagger-editor
I have downloaded swagger v2.10.3
Then I am running it locally. Followed these steps.
npm install -g http-server
wget https://github.com/swagger-api/swagger-editor/releases/download/v2.10.3/swagger-editor.zip
unzip swagger-editor.zip
http-server swagger-editor
At the end when I start the server and run the given url in Chrome. Its not working.
Giving me issue ,
[Mon Jul 25 2016 15:22:06 GMT-0700 (Pacific Daylight Time)] "GET /" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
[Mon Jul 25 2016 15:22:06 GMT-0700 (Pacific Daylight Time)] "GET /" Error (404): "Not found"
[Mon Jul 25 2016 15:22:07 GMT-0700 (Pacific Daylight Time)] "GET /favicon.ico" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
[Mon Jul 25 2016 15:22:07 GMT-0700 (Pacific Daylight Time)] "GET /favicon.ico" Error (404): "Not found"
[Mon Jul 25 2016 15:22:53 GMT-0700 (Pacific Daylight Time)] "GET /" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0"
Can you tell me what am I missing ?
Thankyou.
I'm not sure what the problem is. Try http-server -p with some other port. Maybe this will fix your problem.
Hi.
Could be an option to use -o so that it will open browser right after starting pointing to correct URL. Ref nam http-server page:
-o Open browser window after starting the server
Hello, I tried giving port number with -p but still it did not work.
I even tried -o , but its opening the swagger folder and not the browser.
has this been solved? I am facing a similar issue
Same issue too
Same issue here. I can see the browser hits the web server, but server responded 404 code.
Same here
Hi, has this issue been resolved. I'm facing a similar issue. The only twist in mine was after the installation, I got the editor running once through a browser. After a few modifications on the browser editor, the swagger-editor shutdown unexpectedly. I restarted using the http-server swagger-editor and I get the
Available on: http://ipaddress:port response. But trying to access the editor via browser results in a 404 not found error.
I followed this tutorial: https://scotch.io/tutorials/speed-up-your-restful-api-development-in-node-js-with-swagger.
Created an example project:
./node_modules/swagger project create example
and while starting swagger from the local node_modules folder worked:
./node_modules/swagger project start example
I received 404 from the editor
./node_modules/swagger project edit example
Can someone confirm that swagger-editor work only if it's installed globally?
EDIT:
The exact same order of commands works when swagger is installed globally.
I just had the same issue and I realized it is because I was running the http-server command from the wrong location. If you do http-server swagger-editor from within the extracted zip contents, it produces those errors when trying to get to the page.
Make sure you are not in the "swagger-editor" directory when running the command. You need to be one level higher.
Closing as we don't actively maintain 2.x. If anyone wants to submit a PR against the 2.x docs, we'll look into merging it.
I see the below in the cmd prompt when I tried to access the addresses mentioned nothing is happening. the web page is just blank.
And I would like to know the prerequisites

ANy help is highly appreciated.
escribe el comando $http-server
Solo eso "http-server" y prueba a mi me funciono bien
Most helpful comment
I just had the same issue and I realized it is because I was running the http-server command from the wrong location. If you do http-server swagger-editor from within the extracted zip contents, it produces those errors when trying to get to the page.
Make sure you are not in the "swagger-editor" directory when running the command. You need to be one level higher.