jeudi 31 mai 2018

how to connect to a server running on computer using computer's IP address?

I am working on IOT project in which I have to change some variables(fans speed, lights, etc). So just as a starter, I created a node.js server and tried to send requests to the server through a local network using local IP as

http://localhost:7000/users=mandar?lights=OFF

or

http://192.168.43.248:7000/users=mandar?lights=OFF

and it works fine.

Now I want to do the same over the internet. So I got Computer's IP address from https://www.google.co.in/search?q=myip and tried to send a request to the following URL:

http://(IP_address):7000/users=mandar?lights=OFF

This time it keeps on loading and finally shows this site can't be loaded. So what is the right way to connect to the server through the internet? Thank you.




Aucun commentaire:

Enregistrer un commentaire