diff --git a/g2-ssr/ecosystem.config.js b/g2-ssr/ecosystem.config.js new file mode 100644 index 00000000..253c7fc6 --- /dev/null +++ b/g2-ssr/ecosystem.config.js @@ -0,0 +1,13 @@ +module.exports = { + apps: [ + { + name: "app", + script: "./app.js", + // 自动重启选项 + autorestart: true, // 启用自动重启 + restart_delay: 5000, // 重启延迟(毫秒) + }, + ], + }; + + \ No newline at end of file diff --git a/g2-ssr/package.json b/g2-ssr/package.json index 3564a4f8..1d09ca11 100644 --- a/g2-ssr/package.json +++ b/g2-ssr/package.json @@ -8,6 +8,7 @@ "@rollup/plugin-json": "^6.1.0", "lodash": "^4.17.21", "nan": "^2.22.2", + "pm2": "^6.0.13", "node-canvas": "^2.9.0", "nprogress": "^0.2.0" },