Update README and project cleanup
This commit is contained in:
25
start-tunnel.sh
Executable file
25
start-tunnel.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# DMP Cloudflare Tunnel 启动脚本
|
||||
|
||||
echo "🚀 正在启动 DMP 服务..."
|
||||
|
||||
# 进入项目目录
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# 启动 Node.js 服务器(后台运行)
|
||||
node server.js &
|
||||
SERVER_PID=$!
|
||||
|
||||
echo "✅ DMP 服务已启动 (PID: $SERVER_PID)"
|
||||
echo "🌐 本地访问: http://localhost:3456"
|
||||
echo ""
|
||||
echo "⏳ 等待服务器启动..."
|
||||
sleep 3
|
||||
|
||||
# 启动 Cloudflare Tunnel
|
||||
echo "🔗 正在启动 Cloudflare Tunnel..."
|
||||
cloudflared tunnel --config cloudflare-tunnel.yml run dmp-tunnel
|
||||
|
||||
# 清理:当 tunnel 停止时,也停止 Node.js 服务器
|
||||
kill $SERVER_PID 2>/dev/null
|
||||
Reference in New Issue
Block a user