0

Is there a way to view my project (npm run dev/liveServer) across my home internet network so that hypothetically my iPad, phone or iMac could also view the project live as its being worked on (all connected to my wireless network) without deploying?

starball
  • 20,030
  • 7
  • 43
  • 238
Michael Martell
  • 141
  • 2
  • 16

1 Answers1

0

I believe for LiveServer the setting you are looking to put in your settings.json file is the following:

"liveServer.settings.useLocalIp": true

This will make the live server hosted on your local IP address instead of the loopback/localhost address.

As for your React app, if you're using create-react-app, then you can use the HOST and PORT environment variables. You can get your machine's local IP address using ipconfig on Windows, and on UNIX, use one of the methods described in https://superuser.com/q/347408/1749748 such as ifconfig -a. If you're not using create-react-app, then use the host and port fields of the devServer field of your Webpack config as described here.

starball
  • 20,030
  • 7
  • 43
  • 238