TwiScan
Hot
Communities
Account collections
Login
Register
English
日本語
한국의
简体中文
繁体中文
Register and share your invite link to earn from video plays and referrals.
Register now
Ren
@Ryrenz
AI Engineer | 分享实用 AI 工具和实战心得
Joined March 2025
690
Following
11.4K
Followers
Ren
@Ryrenz
2026.09.06 11:09
🚦 太强了,portless 给每个本地项目发一个固定的 https 域名,再也不用记这个到底跑在 3000 还是 3001。 GitHub 上 12151 star,399 个 fork,仓库今年 2 月才建,半年多冲到这个数,最近还在热榜上。 同时开三四个项目的人应该有体会:一个 monorepo 里好几个应用,端口按 3000、3001、3002 排下去,重启一次顺序变了,收藏夹里的地址全废。想让手机连上电脑看效果,得先查内网 IP 再拼端口;想给同事看一眼,还得现开 ngrok。 portless 把这些一次性解决了。每个项目分一个 app.localhost 这样的名字,https 和 HTTP/2 默认就开着,首次运行自动生成本地 CA、装信任、占住 443 端口。真实端口它自己在 4000 到 4999 里随机挑,通过 PORT 环境变量传给你的应用。Vite、Astro、React Router、Angular、Expo、React Native 这些不认 PORT 的框架,它会自动补上 --port 和 --host 参数。 monorepo 会自己读 pnpm-workspace.yaml 或者 package.json 的 workspaces 找包,一个 portless.json 就能覆盖各包配置。加 --lan 绑到全网卡,配合 mDNS 让同一网络下的手机用 .local 域名直接访问;要给外面的人看,--tailscale 或者 --ngrok 一个参数的事。还能装成开机自启的系统服务,launchd、systemd、任务计划程序都支持。 端口号本来就不该是人要记的东西。 GitHub:
Show more
0
0
1
9
2
Forward to community
Most Popular Users
Tibo
@thsottiaux
917.2K Followers
TheStreet
@TheStreet
1.2M Followers
The Wall Street Journal
@WSJ
22.3M Followers
Seeking Alpha
@SeekingAlpha
343.7K Followers
CNBC
@CNBC
6.3M Followers
Serenity
@aleabitoreddit
1.1M Followers
Benzinga
@Benzinga
345.1K Followers
Stocktwits
@Stocktwits
1.2M Followers
zerohedge
@zerohedge
3.4M Followers
unusual_whales
@unusual_whales
5.4M Followers
Yahoo Finance
@YahooFinance
2.1M Followers
New York Post
@nypost
4.2M Followers
Elon Musk
@elonmusk
241.5M Followers
Reuters
@Reuters
26.4M Followers
OpenAI
@OpenAI
5.5M Followers