From 1900a64160bb28fb785c230f124ed40c87e3673d Mon Sep 17 00:00:00 2001 From: karlcarlo Date: Thu, 29 Jan 2026 13:34:06 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E4=BB=A5=E9=80=9A=E8=BF=87forever=E7=AE=A1?= =?UTF-8?q?=E7=90=86Node.js=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 设置日志目录和PID文件路径 - 使用forever守护进程运行pnpm start命令 - 指定应用唯一标识符和端口4010 --- run.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 run.sh diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..c789ee9 --- /dev/null +++ b/run.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +export LOG=/var/log/nodejs/or_r +export PID=$LOG/forever.pid +export UID_TAG=or_r + +forever start -l $LOG/access.log -o $LOG/out.log -e $LOG/err.log -a --uid $UID_TAG --pidFile $PID -c "pnpm start -p 4010" ./