fix:优化启动配置
This commit is contained in:
14
start.sh
Normal file
14
start.sh
Normal 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
|
||||
Reference in New Issue
Block a user