Files
feishu_approval_design/deploy/start.sh
2026-06-11 15:27:52 +08:00

19 lines
430 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# CentOS 7 启动脚本Node.js 16.x
set -e
cd "$(dirname "$0")/.."
if ! command -v node >/dev/null 2>&1; then
echo "[ERROR] node not found. Install Node.js 16.x first."
exit 1
fi
NODE_MAJOR=$(node -p "process.versions.node.split('.')[0]")
if [ "$NODE_MAJOR" -lt 16 ]; then
echo "[ERROR] Node.js 16+ required. Current: $(node -v)"
exit 1
fi
echo "Starting with Node $(node -v) ..."
exec node server.js