localhost:3000, localhost:8080, and localhost:5173 across a multi-service project is a recipe for confusion. You paste the wrong URL into a browser tab, your teammates get mismatched environments, and your proxy config in each framework adds yet another moving part. This guide shows you how to assign clean, memorable domain names — http://frontend.localhost, http://api.localhost, and http://admin.localhost — to each of your local dev servers using Toolkit’s built-in reverse proxy. No port numbers, no browser extensions, and no sudo required.
The Scenario
You’re working on a project with three services running simultaneously:- Next.js frontend — started via
npm run dev, listens on a dynamic port - Node.js API — started via
node server.js, listens on port 4000 - Python docs server — started via
python -m http.server 8000
.localhost subdomain.
Start Your Services with Clean Domains
1
Start the Next.js frontend
Use Toolkit spawns your process, watches for the listening port, and registers
toolkit run to launch your frontend and register it under http://frontend.localhost automatically. Toolkit detects the port your dev server binds to and wires up the proxy route for you.frontend as a proxy subdomain — all in one command.2
Start the Node.js API
Launch your API server the same way. Use the name
api to expose it at http://api.localhost.3
Start the Python docs server
Start the Python HTTP server and register it under
http://docs.localhost.4
Verify all proxy routes
Confirm that all three services are registered and active by listing the current proxy routes:You should see output similar to:
5
Open each service in your browser
Navigate directly to each service using its clean
.localhost URL — no port number needed:- Frontend: http://frontend.localhost
- API: http://api.localhost
- Docs: http://docs.localhost
127.0.0.1 natively in every modern browser, in full compliance with RFC 6761. No hosts file edits, no browser flags.Manual Registration
If you already have a server running on a specific port and want to register a proxy route without restarting it, usetoolkit proxy add:
http://backend.localhost:
Makefile target.
Removing a Route
To deregister a proxy route when you’re done with a service, usetoolkit proxy remove:
toolkit proxy list to confirm the route is gone.
WebSockets and HMR
All proxy routes created by Toolkit support WebSockets and Hot Module Replacement (HMR) automatically. Your Next.js or Vite dev server’s hot-reload functionality will work exactly as expected through the
.localhost URL — no additional configuration needed in next.config.js, vite.config.ts, or anywhere else.