Expose gives your Vite dev server a public HTTPS URL, so you can open your React, Vue or Svelte app on another device or show it to someone else.
npm run dev
Vite listens on port 5173 by default. In a second terminal:
expose share http://localhost:5173
Vite only answers requests for hostnames it knows. If the shared URL shows "Blocked request. This host is not allowed.", add the Expose domain to server.allowedHosts in vite.config.js:
export default {
server: {
allowedHosts: ['.sharedwithexpose.com'],
},
}
The leading dot allows every subdomain. If you use your own custom domain, allow that instead.
If Vite runs next to a Laravel site, you don't need to share Vite yourself. Share the site, and Expose detects the running Vite process, shares it too, and rewrites the page so CSS, JavaScript and hot reloading work through the tunnel:
expose share my-app.test
--lan to share on the local network with a QR code, without an account. See Local Network Sharing.--subdomain=my-app with Expose Pro.