Q:

How to share the gatsby site on LAN?

I build my website in my machine, but for preview I want to see it on my phone without deploying it, is that any way to do that.
my Gatsby site is live now on localhost:8000/, when I try to visit it on my phone I'm getting
This site can’t be localhost:8000 

server IP address could not be found.
DNS_PROBE_FINISHED_NXDOMAIN`

A:

You can use the Gatsby develop command with the host option to access your dev environment on other devices on the same network, run:
Copycopy code to clipboard
gatsby develop -H 0.0.0.0

Then the terminal will log information as usual, but will additionally include a URL that you can navigate to from a client on the same network to see how the site renders.
Copycopy code to clipboard
You can now view gatsbyjs.org in the browser.
⠀
  Local:            http://0.0.0.0:8000/
  On Your Network:  http://192.168.0.212:8000/

Note: To access Gatsby on your local machine, use either http://localhost:8000 or the “On Your Network” URL.
Resource

