React Native Expo change default LAN IP

ssuhat picture ssuhat · Apr 29, 2017 · Viewed 31.8k times · Source

I've got virtual box installed. And when I look at the host > LAN > ip address is exp://192.168.56.1:19000.

How can I change it without disable the network? because it's my virtualbox ip and my device can't connect to it.

Thanks

Answer

dikaiosune picture dikaiosune · May 2, 2017

You can specify the REACT_NATIVE_PACKAGER_HOSTNAME environment variable to use the correct IP address.

If you're using XDE, then make sure to launch it from your project directory with xde . after you've installed the command line tools.