When developing web apps, testing across multiple devices is vital to ensure that what you’re building will work for you users. Chrome OS’s built-in port forwarding allows you to open the port to your local development server, allowing access from phones or other computers.
Start by going to the Linux (Beta) settings on Chrome OS and clicking the Linux box. There should be an option Port forwarding. Click on that.
This will open up the Port forwarding screen. When you set up ports to be forwarded, they’ll show up here. Click the Add button to forward a port.
Once added, your ports will show up in the Port forwarding list, where you can toggle them on or off or remove them entirely.
In order to get the IP address to use with that port, in your Terminal app, run
hostname -I. This IP address, combined with the port you’re forwarding, will allow any device on the network access to the server on the port you’ve forwarded.