Development Server
Useful recipes when working with the development server.
Accessing the development server from a mobile device
The default value for the development host is localhost on port 8081. This is a useful default for local development, but does not work when developing UI on a mobile device because localhost is an alias to the loopback address 127.0.0.1 only accessible from the development machine.
There are two ways to deal with this:
Using the IP address of the development machine
If you're not sure how to find the IP address of your development machine, read this excellent guide written by the NordVPN team.
Instead of localhost, we can specify the IP address of the development machine, i.e 192.168.1.100. Keep in mind that your local IP address may change depending on your network and router configuration.
Using a tunnel
Another, slightly more involved, but very reliable way to facilitate access from your mobile device to the development server is to use a tunnel.
A tunnel is a service that runs on your development machine and exposes a certain port to a public DNS address on the internet. This makes it possible to access the development server even if it is on a different network or behind a firewall.
There are many tunnels available, and it is outside of the scope of this documentation to recommend a specific one or explain how to use it. That being said, this list on GitHub is an excellent starting point for choosing a good tunnel.