mercredi 27 février 2019

Runs on localhost:4000 but not on ec2-ip:4000

I have a nodejs app running on port 4000. I have developed it in my Vagrant box running Ubuntu 16.04 where I am able to curl both http://localhost:4000 and http://vagrant-IP:4000.

However, when I replicate the same set-up on an EC2 instance, I am able to curl only on http://localhost:4000 and not on http://ec2-public-IP:4000.

In both cases server is listening on 0.0.0.0 and CORS is enabled. (Here, vagrant-IP and ec2-public-IP are actual IPv4 addresses). How can I fix this?




Aucun commentaire:

Enregistrer un commentaire