项目太多分不清端口?一行命令解决

66 阅读1分钟

还找不到项目对应的端口?一行命令解决

npx psview --url
PID     Type            URL                             Path
──────────────────────────────────────────────────────────────────────────────
96555   Node.js         http://localhost:8001           /path/to/project/
9692    Node.js         http://localhost:8003           /path/to/project/
9193    Node.js         http://localhost:16105          /Applications/Visual

更多用法

# 默认:显示所有 Node.js 进程
npx psview

# 仅显示带有 URL 的进程
npx psview --url

# 显示所有进程
npx psview --all

# 匹配特定进程名称
npx psview --pattern python

# JSON 格式输出
npx psview --json

# 查看帮助
npx psview --help