Hasty Briefsbeta

Bilingual

portless – named .localhost URLs for Development

a day ago
  • #dev tools
  • #local development
  • #proxy server
  • Portless replaces port numbers with named .localhost URLs for local development, usable by both humans and agents.
  • Install globally or as a project dev dependency, but per-project install may require re-running 'portless trust' due to pre-1.0 version changes.
  • Run your app by executing 'portless', which reads the 'dev' script from package.json and runs it through a proxy.
  • The app name is inferred from package.json, git root, or directory name, and can be overridden via portless.json.
  • HTTPS with HTTP/2 is enabled by default, generating a local CA on first run; use --no-tls for plain HTTP.
  • Portless assigns a random port (4000-4999) via PORT environment variable, auto-injecting --port or --host flags for frameworks ignoring PORT.
  • Use 'portless' in package.json scripts to keep them clean, or directly within the script.
  • Organize services with subdomains for different parts of your app.
  • Git worktrees are automatically detected, prepending branch names as subdomains for unique URLs.
  • Custom TLDs like .test can be set via --tld, avoiding .local and .dev; proxy auto-syncs /etc/hosts.
  • Portless runs an HTTPS reverse proxy on port 443, proxying requests to apps on assigned ports.
  • Requirements: Node.js 20+, macOS, Linux, or Windows.