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

后端 未结 15 1668
旧时难觅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:12

    The port is probably blocked by your local firewall or router. Hard to tell without details.

    But there is a simple solution for which you don't have to mess with firewall rules, run node as a privileded process to serve on port 80, etc...

    Check out Localtunnel. Its a great Ruby script/service, which allows you to make any local port available on the internet within seconds. It's certainly not useful for a production setup, but to try out a game with colleagues, it should work just fine!

提交回复
热议问题