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"] }