Browse Source

优化deploy.sh脚本,移除PM2应用启动和重启时的Node参数,简化启动流程。

wui 6 months ago
parent
commit
64d549155c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      deploy.sh

+ 2 - 2
deploy.sh

@@ -91,10 +91,10 @@ cp package.json dist/package.json
 # 检查 PM2 应用是否已存在并启动
 # 检查 PM2 应用是否已存在并启动
 if pm2 list | grep -q "tweb-api"; then
 if pm2 list | grep -q "tweb-api"; then
     echo "🔄 重启现有的 PM2 应用..."
     echo "🔄 重启现有的 PM2 应用..."
-    pm2 restart tweb-api --node-args="--experimental-specifier-resolution=node"
+    pm2 restart tweb-api
 else
 else
     echo "🚀 启动新的 PM2 应用..."
     echo "🚀 启动新的 PM2 应用..."
-    pm2 start dist/server.js --name tweb-api --node-args="--experimental-specifier-resolution=node"
+    pm2 start dist/server.js --name tweb-api
 fi
 fi
 pm2 save
 pm2 save