I got the following error while running curl:
curl: (7) Failed to connect to 127.0.0.1 port 8080: Connection refused.
It seems
Try curl -v http://localhost:8080/
instead of 127.0.0.1
Make sure you have a service started and listening on the port.
netstat -ln | grep 8080
and
sudo netstat -tulpn
127.0.0.1 restricts access on every interface on port 8000 except development computer. change it to 0.0.0.0:8000 this will allow connection from curl.