implementation of ecosystem.config.js.example

This commit is contained in:
AmirHossein Mahmoodi
2023-10-30 14:31:47 +03:30
parent 67bb743a9e
commit c23c2a8a6c
2 changed files with 19 additions and 0 deletions

1
.gitignore vendored
View File

@@ -3,6 +3,7 @@
/node_modules
.env
package-lock.json
ecosystem.config.js
# Logs
logs

View File

@@ -0,0 +1,18 @@
module.exports = {
apps: [{
name: "notification_server",
script: "./dist/main.js", // cluster mode run with node only, not npm
args: "",
exec_mode: "cluster", // default fork
instances: "max",
kill_timeout: 4000,
wait_ready: true,
autorestart: true,
watch: false,
max_memory_restart: "1G",
log_date_format: "YYYY-MM-DD HH:mm Z",
env: {
NODE_ENV: "prod",
},
}],
};