Fix PM2 startup and harden server entry detection.

Use a bash launch script for production and pathToFileURL-based main-module checks so sourcing.simosen.cn listens reliably under PM2.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-15 00:55:21 +08:00
parent e9939ef9dc
commit 3cace7ab42
3 changed files with 17 additions and 4 deletions
+4
View File
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
exec /root/.nvm/versions/node/v20.20.2/bin/node src/server.js