How to open a create-react-app from another computer connected to the same network?

前端 未结 10 554
旧时难觅i
旧时难觅i 2021-02-02 06:38

I am using create-react-app and hosting in its default port localhost:3000 and want to access this from another device on the same net

10条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-02 07:09

    In my case, npm run start used my Ethernet adapter's IP e.g. http://192.168.167.113:3000 but as I was accessing the site using WLAN, I needed to use WLAN IP which was 192.168.0.227.

    Make sure to use WLAN IP with the same port to make it work.

提交回复
热议问题