From 0223cdcdcc6351b579a8861924880c0fd5467268 Mon Sep 17 00:00:00 2001 From: xun082 <2042204285@qq.com> Date: Tue, 29 Oct 2024 17:47:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=9A=80=20=E6=96=B0=E5=A2=9E=20pm2?= =?UTF-8?q?=20=E9=85=8D=E7=BD=AE=E7=94=A8=E4=BA=8E=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecosystem.config.cjs | 12 ++++++++++++ package.json | 3 ++- tsconfig.json | 3 ++- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 ecosystem.config.cjs diff --git a/ecosystem.config.cjs b/ecosystem.config.cjs new file mode 100644 index 0000000..d065b5b --- /dev/null +++ b/ecosystem.config.cjs @@ -0,0 +1,12 @@ +module.exports = { + apps: [ + { + name: 'online_editor_web', + script: './node_modules/next/dist/bin/next', + args: 'start -p 3000', + instances: 1, + autorestart: true, + watch: false, + }, + ], +}; diff --git a/package.json b/package.json index 7f1aa57..046121d 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "format:ci": "prettier --list-different \"**/*.{ts,tsx,js,jsx}\"", "test": "vitest", "storybook": "storybook dev -p 6006", - "build-storybook": "storybook build" + "build-storybook": "storybook build", + "ps": "pm2 start ecosystem.config.cjs" }, "keywords": [], "author": "Moment", diff --git a/tsconfig.json b/tsconfig.json index c9b982f..0470c08 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -31,7 +31,8 @@ "**/*.tsx", ".next/types/**/*.ts", "eslint.config.cjs", - ".storybook/**/*" + ".storybook/**/*", + "ecosystem.config.cjs" ], "exclude": ["node_modules"] }