Skip to content
Documentation

Framework guides

Share any local dev server

Start your app the usual way, then run localians share with the port it prints. Default ports are listed below, but always use the one your terminal shows: it changes if the default is busy or configured differently.
Verified end to end in our test suite: Next.js and Vite, including hot reload. Vue, Angular and the other servers below use the same standard HTTP and WebSocket features but aren't yet covered by automated tests.

Next.js

Usually port 3000.

$ npm run dev$ localians share 3000

Hot reload: Next.js blocks its development resources for other origins. Allow your preview domain in next.config.js (for the local beta server that's *.preview.localhost):

$ allowedDevOrigins: ["*.preview.localhost"]

Without it, pages still load, but edits won't appear live for the person viewing the preview.

React with Vite

Usually port 5173. Works without changes, hot reload included.

$ npm run dev$ localians share 5173

If you share with --host-header preserve, add the preview domain to server.allowedHosts in vite.config.

Vue

Projects created with npm create vue use Vite: usually port 5173. Older Vue CLI projects use npm run serve on port 8080.

Vite (create-vue)
$ npm run dev$ localians share 5173
Vue CLI
$ npm run serve$ localians share 8080

Angular

Usually port 4200.

$ npm start$ localians share 4200

ng serve works the same way. If you pass --host-header preserve, also start Angular with --allowed-hosts for the preview domain.

Other HTTP servers

Anything that answers HTTP on a local port can be shared. Common defaults:

  • Express / Node: whatever your code passes to listen(), often 3000 or 8080.
  • Django: python manage.py runserver — 8000.
  • Rails: bin/rails server — 3000.
  • Flask: flask run — 5000.
  • Laravel: php artisan serve — 8000.
$ localians share 8000

By default your app sees requests as coming to localhost:<port>, which keeps host checks happy. If your app builds absolute links from the request host, those links will point at localhost — use --host-header preserve and allow the preview domain in the framework's allowed-hosts setting.

Something not working? See Troubleshooting.