15 lines
370 B
Bash
15 lines
370 B
Bash
#!/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
|