#Live preview links
Every chatspace has its own public HTTPS URL. Run a web app or API on the machine, point the URL at it, and it's instantly reachable — perfect for a tight build-and-preview loop or sharing a prototype with someone.
#The easy way: ask the agent
You usually don't have to think about any of this. Just ask:
"Run the dev server on port 3000 and give me a public link."
The agent starts your server, wires up the route, and hands you back a link like
your-repo.chatspaces.dev. Tap it to open, or share it.
The rest of this page is the detail underneath — useful if you want to expose several things, pick paths, or set it up yourself.
#How it works
Your chatspace's public URL is served by a small reverse proxy on the machine. You tell it which local port (or address) should serve which path by writing a route table to a file:
~/.chatspace/proxy.conf
One rule per line, as <path-prefix> <target>:
/api 3000
/ 8081 name=Web protocols=https
That says: send requests under /api to the app on port 3000, and send everything else (/,
the catch-all) to the app on port 8081.
Save the file and it takes effect immediately — no restart.
#Targets
The target on the right can be:
| Target | Means |
|---|---|
3000 |
127.0.0.1:3000 (a local port) |
host:port |
a specific host and port |
http://… / https://… |
a full URL, forwarded as-is |
#Path matching
Longest matching prefix wins, so order doesn't matter. A request to
/api/healthmatches/apibefore it matches/./is the catch-all. If you're only running one thing, a single line is enough:/ 3000
#Route options
Add optional metadata after the target:
name=My_App(orlabel=…) — the display name shown for the link in the app. Underscores become spaces.protocols=https,exp— publish one link per scheme.httpsis the normal web link;expproduces an Expo Go link for React Native apps.
/ 8081 name=Expo protocols=https,exp
/api 3000 name=API
#WebSockets & hot reload
WebSocket connections and live-reload streams are forwarded, so hot-reloading dev servers and real-time apps work through the link unchanged.
#Good to know
- Port
8080is reserved — don't use it for your app. - Links are tied to your chatspace's URL, so a given chatspace keeps a stable address across stops and resumes.
- The link only serves what you point it at. If your app isn't running, or you haven't added a route for it, requests won't resolve — see Troubleshooting.
- Anyone with the URL can reach it — and an inbound request can even briefly wake a stopped chatspace to serve it. Don't put secrets in a preview you share, and delete the chatspace when you're done if it's sensitive (stopping alone leaves the link wakeable).
- Serving traffic uses your usage — see how web requests count.
Next: manage secrets with environments, or see how GitHub access works.