Boot up rails app, make request to app from outside local network

前端 未结 1 2035
盖世英雄少女心
盖世英雄少女心 2021-01-26 06:00

I\'m sure this is a pretty basic question, but I could not find an answer to it. I already looked at this question, this question, this question, this question, and this questi

相关标签:
1条回答
  • 2021-01-26 06:10

    You can not bind the socket to your external IP. This IP is assigned to your modem (or whatever you use to connect to the internet) by your ISP. You can only bind to interfaces of your computer.

    There are multiple solutions:

    • Bind to 0.0.0.0:3000 (or your computers IP, not localhost) and make sure that your network forwards your public IP to your computer on that port.
    • Use something like https://ngrok.com/ easy and simple
    0 讨论(0)
提交回复
热议问题