How could others, on a local network, access my NodeJS app while it's running on my machine?

后端 未结 15 1693
旧时难觅i
旧时难觅i 2020-12-02 07:55

I have a pretty straight-forward question. I made a web game with NodeJS, and I can successfully play it by myself with multiple browser windows open side-by-side; however,

15条回答
  •  悲&欢浪女
    2020-12-02 08:03

    By default node will run on every IP address exposed by the host on which it runs. You don't need to do anything special. You already knew the server runs on a particular port. You can prove this, by using that IP address on a browser on that machine:

    http://my-ip-address:port
    

    If that didn't work, you might have your IP address wrong.

提交回复
热议问题