初始化

This commit is contained in:
Weiming
2026-06-11 15:27:52 +08:00
commit 19d0df4fa9
10 changed files with 5332 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
[Unit]
Description=Feishu Approval Designer Service
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/feishu-approval
Environment=NODE_ENV=production
Environment=PORT=8080
Environment=HOST=0.0.0.0
ExecStart=/usr/bin/node server.js
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target

18
deploy/start.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/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