简体   繁体   中英

Node.js Chat App host testing

I have made a very simple chat application following this tutorial - Tutorial Link . I have also made a website locally.

I have run my chat app through locally made server - http://127.0.0.1:3700/

But now I want to test it with a friend through another computer and see if we can chat to eachother. How is this done? If I send him this server - http://127.0.0.1:3700/ , it doesn't work.

Do I need to host the app somewhere to test? Maybe github?

You can do this by using ngrok

download ngrok

After downloading you have to expose your port

This is the sample in Mac OSX 在此处输入图片说明

because you binding the address to 127.0.0.1 which is your machine local IP address.

When your friend putting 127.0.0.1:3700 it will point to his own machine instead of yours.

try to change the 127.0.0.1 to your own ip address, then ask your fiend to put ipaddress:3700 .

how to get your IP address:

windows: https://support.microsoft.com/en-my/help/15291/windows-find-pc-ip-address Linux: http://www.wikihow.com/Check-the-IP-Address-in-Linux

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM