wui 6 kuukautta sitten
vanhempi
commit
c2402e65c3
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      deploy.sh

+ 2 - 2
deploy.sh

@@ -110,11 +110,11 @@ cp package.json dist/package.json
 if pm2 list | grep -q "tweb-api"; then
     echo "🔄 重启现有的 PM2 应用..."
     pm2 delete tweb-api
-    pm2 start dist/server.js --name tweb-api
+    pm2 start dist/server.js --name tweb-api --env production
 else
     echo "🚀 启动新的 PM2 应用..."
     echo "📁 启动文件: $(pwd)/dist/server.js"
-    pm2 start dist/server.js --name tweb-api
+    pm2 start dist/server.js --name tweb-api --env production
 fi
 pm2 save