I installed NodeJS on my computer and ran some tests and all works fine on my machine. Now I want a friend, that is not in the same network, to connect to my computer, so that NodeJS can response to my friend's request. But I don't know, on which IP and port I have to listen to and I don't know, which IP I have to give my friend, that he can connect to my computer.
I already tried to get my public computer IP via command prompt and ipconfig
, but all attempts to connect to this address failed. Also when my friend connects to my router's IP address.
What am I making wrong and how to do it correctly?