fix:优化启动配置

This commit is contained in:
Daniel
2026-03-07 23:47:29 +08:00
parent c3d219efc1
commit 7db497bc94
6 changed files with 219 additions and 4 deletions

14
start.sh Normal file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# 联合启动:静态 + API单端口默认 3000
# 在项目根目录执行: ./start.sh 或 PORT=8080 ./start.sh
set -e
cd "$(dirname "$0")"
PORT="${PORT:-3000}"
export PORT
echo "[720yun-offline] 安装依赖..."
npm install --no-audit --no-fund
echo "[720yun-offline] 启动(静态+API http://0.0.0.0:${PORT}"
exec node server.js