// use case
Expose your Angular dev server to the internet with a public URL in under a minute.
Start the Angular dev server on a fixed port
$ ng serve --port 4200Open a tunnel to that port
lrok assigns a stable public HTTPS URL that proxies all traffic — including WebSocket connections used by Angular's HMR live-reload — to your local port.
$ lrok http 4200Allow the tunnel host in angular.json
Angular CLI's dev server rejects requests whose Host header does not match an allowed origin. Add your tunnel hostname (or a wildcard) to the `allowedHosts` array inside your project's `serve` configuration in `angular.json`: ```json "serve": { "options": { "allowedHosts": ["all"] } } ``` Alternatively, pass the flag directly: `ng serve --allowed-hosts all`. Without this, every request through the tunnel returns a 403 Invalid Host header error.
// why lrok for this
Angular CLI's dev server proxies WebSocket frames for HMR on the same port as HTTP; lrok tunnels both protocols over a single connection without requiring separate port mappings or custom webpack-dev-server proxy configuration.