View dev app on local network?
Answered
Lord_TCG#9068 posted this in #help-forum
It was my understanding
Do I need to do any additional config/setup to get this to work? I've done it in the past but it's been years so maybe I forgot a step? I was hoping to get my desktop via localhost and my mobile via
Any help would be great 🙂
http://<ipAddress>:<portNumber> would allow any device on the same home wifi network to view my app? However doing so just returns a timeout error page for my desktop and mobile devices.Do I need to do any additional config/setup to get this to work? I've done it in the past but it's been years so maybe I forgot a step? I was hoping to get my desktop via localhost and my mobile via
http://<ipAddress>:<portNumber> to view the app together so I can design for both setups in real time, rather than do one later after completing the other.Any help would be great 🙂
Answered by Toyger
your firewall, or maybe custom antivirus software can block connection, and are you using ip of local network not external?
10 Replies
For context, I just have the default vercel template code after running
npx create-next-app@latestCape horse mackerel
I've just tried and it works fine
npm run build && npm run start http://my-ip:3000 and can view it on the mobileSo you have to use the build version not the dev version?
Toyger
your firewall, or maybe custom antivirus software can block connection, and are you using ip of local network not external?
Answer
Cape horse mackerel
well next start will use production environment variables by default
you can set smth like
you can set smth like
"start:dev": "NODE_ENV=development next start"Aaah yeah it was a firewall issue. I must have changed AV since I got this working last. New rule fixes the issue
Appreciate your time peeps â¤ï¸