Member-only story
Make NextJs app available in the local network
Jun 15, 2023
So you’re developing a NextJs app, you’re running it on your local machine, and you want to access it from another device that is connected to the same WiFi ?
Here’s how.
First, get your machine’s local IP.
macos/linux: ipconfig getifaddr en0
windows: ipconfig | findstr “IPv4 Address”
(then manually look for your machine’s local IP address)
Then, just load that IP, along with the port that the app is running on.
e.g. if you are running the NextJs app on localhost:3000, and your local IP is 192.168.0.100
Then, on the other device, open 192.168.0.100:3000