Exposing publicly
Public exposure sends requests through a routeup server and back to your local agent over an outbound tunnel. Your app still listens only on a local port.
Requirements
Section titled “Requirements”You need a public-server control URL. For the hosted service, use
https://edge.routeup.dev. The server grants public URLs under routeup.dev,
such as https://example-app.routeup.dev. A reusable named URL also requires a
token; without one, exposure works only when the server enables a token-less
public namespace.
The named examples below assume a root-tier token that allows *.routeup.dev.
A personal namespace token such as *.mukul.routeup.dev would grant
https://example-app.mukul.routeup.dev instead. A public address is reachable
only while its tunnel is connected.
You can save both during setup:
routeup setup --server https://edge.routeup.dev --token sk_routeup_xxxOr pass them per command:
routeup serve example-app --port 8080 --server https://edge.routeup.dev --token sk_routeup_xxx --exposeExpose a local port
Section titled “Expose a local port”routeup serve example-app --port 8080 --exposeThe command prints the local route, the public URL, the exposed path scope, and
the resolved targets. It holds both the local route and public tunnel until you
press Ctrl-C.
route: example-applocal: https://example-app.localhostpublic: https://example-app.routeup.devexpose: all pathstargets: / http://localhost:8080
press Ctrl-C to stopName rules
Section titled “Name rules”Local route names may be dotted, such as api.example-app. Public hosts must be one
label under their namespace, so routeup normalizes dots to hyphens when
exposing: local route api.example-app becomes public label api-example-app.
Do not include https:// or the public suffix in the route name. Pass example-app, not https://example-app.routeup.dev.
Token-less random names
Section titled “Token-less random names”--random generates a random route name. Without a token, a server’s public
namespace makes that claim session-only:
routeup serve --random --port 8080 --server https://edge.routeup.dev --exposeOn the hosted server, random token-less names are under try.routeup.dev:
route: lively-otter-4f2local: https://lively-otter-4f2.localhostpublic: https://lively-otter-4f2.try.routeup.devexpose: all pathstargets: / http://localhost:8080
press Ctrl-C to stopLimit public paths
Section titled “Limit public paths”By default, public exposure forwards every path on the route. To expose only a webhook prefix, set expose.paths in project config:
{ "name": "example-app", "port": 8080, "expose": { "paths": ["/api/webhooks/*"] }}Then run:
routeup serve --exposeRequests to https://example-app.routeup.dev/api/webhooks/... are public; other paths stay local-only.