首页/ AI 技能 / @skilllib/skill-2014279385413529603
Skill站外收录 @skilllib/skill-2014279385413529603

dev-server-sandbox

通过为每个实例创建独立的临时运行环境,支持并行启动多个互不干扰的开发服务器,自动分配可用端口并隔离配置文件,便于多项目调试与测试,同时避免密钥泄露风险。

0.0 (0) 704 次安装 原作者 编程导航
收录于 2026-01-22
效率工具 AI 技能

Skills.MD

# `dev-server` sandbox instances `make dev-server` starts the mux backend server, which uses a lockfile at: - `<MUX_ROOT>/server.lock` (defaults to `~/.mux-dev/server.lock` in development) This means you can only run **one** dev server per mux root directory. This skill documents the repo workflow for starting **multiple** dev-server instances in parallel (including from different git worktrees) by giving each instance its own temporary `MUX_ROOT`. ## Quick start ```bash make dev-server-sandbox ``` ## What it does - Creates a fresh temporary `MUX_ROOT` directory - Copies these files into the sandbox if present: - `providers.jsonc` (provider config) - `config.json` (project list) - Picks free ports (`BACKEND_PORT`, `VITE_PORT`) - Allows all hosts (`VITE_ALLOWED_HOSTS=all`) so it works behind port-forwarding domains - Runs `make dev-server` with those env overrides ## Options ```bash # Use a specific root to seed from (defaults to ~/.mux-dev then ~/.mux) SEED_MUX_ROOT=~/.mux-dev make dev-server-sandbox # Keep the sandbox root directory after exit (useful for debugging) KEEP_SANDBOX=1 make dev-server-sandbox # Pin ports (must be different) BACKEND_PORT=3001 VITE_PORT=5174 make dev-server-sandbox # Override which make binary to use MAKE=gmake make dev-server-sandbox ``` ## Security notes - `providers.jsonc` may contain API keys. - The sandbox root directory is created on disk (usually under your system temp dir). - This flow intentionally **does not** copy `secrets.json`.

评论 0

还没有评论,来抢沙发。