I am trying to set up Swagger in a VM/Vagrant box. What I have done is below.
i. Port Forwarding using Vagrantfile
dev.vm.network "forwarded_port", guest: 3000, host: 3000, host_ip:
"127.0.0.1", auto_correct: true
ii. Swagger configuration in a vagrant box
npm install -g swagger
Create a new swagger project
swagger project create hello-world
I tried to open Swagger Editor with command swagger project edit -p 3000 -s
, which gives
Starting Swagger Editor. Running Swagger Editor API server. You can make GET and PUT calls to http://127.0.0.1:3000/editor/spec
Seems like everything is perfect so just visited browser of local desktop(windows), and visited http://localhost:3000/editor/spec
which gives me This site can’t be reached.
curl http://localhost:3000/editor/spec is working fine in the VM/vagrant box.
What wrong am I doing here?