swagger-node icon indicating copy to clipboard operation
swagger-node copied to clipboard

Working with swagger-editor in VM

Open sohampshetty opened this issue 7 years ago • 1 comments

I am trying to configure swagger in VM and then access it from a local desktop browser(windows'7).

I set port forwarding:

dev.vm.network "forwarded_port", guest: 3000, host: 3000, host_ip:
"127.0.0.1", auto_correct: true

Followed steps given in swagger official documentation:

npm install -g swagger
Create a new swagger project
swagger project create hello-world

Since I am working with VM and local desktop, I had to run command to open swagger-editor on host 0.0.0.0:

swagger project edit --host 0.0.0.0 -p 3000 -s

Till here I don't have any issues.

Now, when I try to open the editor in the local desktop browser it's just giving me some text in YAML format instead of something like this.

Refer attached screen shot to see how it's looking in a web browser.

enter image description here

sohampshetty avatar Jul 10 '17 12:07 sohampshetty

try npm install -g swagger , don't use yarn

xbl avatar Feb 01 '18 04:02 xbl