build: use pm2 serve for prod.

This commit is contained in:
Ivan Li 2021-05-03 12:03:18 +08:00
parent e21e6fc3e2
commit 7d04d53d02

View File

@ -3,11 +3,16 @@ module.exports = {
{ {
name: "blog-bs", name: "blog-bs",
script: "serve", script: "serve",
args: "-s build", args: "",
watch: false, watch: false,
ignore_watch: ["node_modules"], ignore_watch: ["node_modules"],
log_date_format: "MM-DD HH:mm:ss.SSS Z", log_date_format: "MM-DD HH:mm:ss.SSS Z",
env: {}, env: {
PM2_SERVE_PATH: "./build",
PM2_SERVE_PORT: 7135,
PM2_SERVE_SPA: "true",
PM2_SERVE_HOMEPAGE: "/index.html",
},
max_restarts: 5, max_restarts: 5,
}, },
], ],