Expose can share a site with devices on your local network, like your phone, a tablet or a colleague's laptop on the same Wi-Fi, without a tunnel. Your computer serves the site itself: there is no Expose server in between, so you don't need an account, a login or an internet connection.
Add the --lan option when you share a site:
expose share my-site.test --lan
Expose shows the address that other devices on your network can open:
Shared site http://my-site.test
Dashboard http://127.0.0.1:4040
LAN URL http://192.168.1.23:8080
Local network sharing needs the native Expose client, version 4.2 or later. See Installation.
A local network share works like a share through the Expose network:
--basicAuth works.expose in a project directory, expose catch-all and expose share-port take --lan too.By default, Expose listens on port 8080, or on any free port if 8080 is already taken. Pass a port to use a specific one:
expose share my-site.test --lan=9000
Add --qr-code to show a QR code of the LAN URL in your terminal, so you can open the site on your phone by scanning it:
expose share my-site.test --lan --qr-code
expose share-port with --lan passes every TCP connection on the shared port to a local port, for services that don't speak HTTP:
expose share-port 3306 --lan
Everyone on your local network can open a local network share, so be careful on public or shared Wi-Fi. Protect the share with a password when other people use the network:
expose share my-site.test --lan --basicAuth="user:password"
Local network shares use plain HTTP. Browsers only allow some features, like the camera, the clipboard and service workers, on HTTPS pages or on localhost. To test those on another device, share the site through the Expose network instead, which gives you an HTTPS URL.
If other devices can't connect, check that they are on the same network and that your computer's firewall allows incoming connections for expose.