Replace port numbers with stable named URLs for local development
GitHub RepoImpressions4.3k

Replace port numbers with stable named URLs for local development

@githubprojectsPost Author

Project Description

View on GitHub

Goodbye, Port 3000. Hello, Stable Local URLs.

If you've ever sent a "hey, can you check out my local feature?" link to a teammate, you know the pain. You send http://localhost:3000, they have to ask "wait, what port again?", or worse, their local port 3000 is already taken by another project. The dance of port numbers is a small but constant friction in local development and collaboration.

What if you could just have a stable, memorable URL for your local server that always works, regardless of the port it's actually running on? That's the itch that portless scratches.

What It Does

Portless is a lightweight tool that creates a stable, named .local URL for your local development server. Instead of accessing your app at localhost:8080, you could access it at myapp.local or react-project.local. It runs a local DNS server and a proxy to seamlessly route requests from that pretty URL to whatever random high-numbered port your app is actually using.

Why It's Cool

The clever part is in its simplicity and transparency. You don't have to reconfigure your application server. You run your app as usual (e.g., npm run dev on port 1234), and in another terminal, you run portless pointing at that port with your chosen name. It handles the rest.

This becomes incredibly useful for:

  • Team Demos: Share a single, consistent URL like project-alpha.local for a feature branch. Teammates just need to run one portless command to access it.
  • Multi-Service Projects: Run your frontend on app.local and your API on api.local, making your local environment mirror production routing more closely, without port conflicts.
  • Bookmarking: You can actually bookmark your local development environment. No more remembering if this project runs on 3000, 3001, or 8080.

It sidesteps the complexity of editing your system's hosts file or setting up heavy reverse proxies. It's a focused tool for a specific, common problem.

How to Try It

Portless is a Node.js package. You can install and try it out in a few minutes.

First, install it globally via npm:

npm install -g @vercel/portless

Then, start your development server as you normally would. Let's say it's running on http://localhost:3000.

In a new terminal window, run portless, giving it a name and the target port:

portless myawesomeapp 3000

That's it. Now open your browser and navigate to http://myawesomeapp.local. Your app should be there. Anyone else on your local network can do the same if they run the same portless command.

Final Thoughts

Portless feels like one of those utilities that, after you use it for a week, you wonder how you dealt with the old way. It doesn't solve a world-changing problem, but it neatly eliminates a daily micro-frustration. For developers who constantly juggle multiple projects or who collaborate closely, it’s a straightforward upgrade to the local development workflow. It’s worth a shot to see if those stable URLs make your process just a bit smoother.

Check out the project on GitHub to see the code, report issues, or contribute.


@githubprojects

Back to Projects
Project ID: 44625a74-5aad-498c-98e2-3081be29e613Last updated: March 12, 2026 at 06:38 AM