I am trying to view my NEXT APP from another computer. Both of them are connected over the same network.
IP of host network: XXX.XXX.X.X (obtained from ipconfig in windows machine under IpV4 address of LAN section)
On my Mac, I am using: http://XXX.XXX.X.X:3000/ but it says This site can't be reached. Like React application, is it possible to view the NEXT app onto another computer too or we can’t do that here?
>Solution :
Next.js can start dev server with yarn dev or npm run dev with Host or IP configuration, just pass the flags into it with -H
yarn dev -H XXX.XXX.X.X
or
npm run dev -H XXX.XXX.X.X
then it will start the host or ip you pass instead of 0.0.0.0
You can read the docs here