From 5f8ddaadecf613d57f8d61252caa41959a28031f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Mon, 15 Jan 2024 09:56:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.bash | 16 ++++++++++++++++ pm2.json | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 build.bash diff --git a/build.bash b/build.bash new file mode 100644 index 000000000..8e9b302d7 --- /dev/null +++ b/build.bash @@ -0,0 +1,16 @@ +#!/bin/bash + +# 确保脚本在当前目录执行 +cd "$(dirname "$0")" + +# 安装依赖 +npm install + +# 构建项目 +npm run build + +# 构建服务器端 +npm run build:server + +# 使用PM2启动应用程序 +npm run pm2 \ No newline at end of file diff --git a/pm2.json b/pm2.json index 58395a860..c067197a8 100644 --- a/pm2.json +++ b/pm2.json @@ -9,6 +9,6 @@ "env": { "NODE_ENV": "production" }, - "instances": 0 + "instances": 4 }] }