From c23c2a8a6cc983b30ca6113b3097d5e009e08c85 Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Mon, 30 Oct 2023 14:31:47 +0330 Subject: [PATCH] implementation of ecosystem.config.js.example --- .gitignore | 1 + ecosystem.config.js.example | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 ecosystem.config.js.example diff --git a/.gitignore b/.gitignore index 7b2dbcb..caca0a4 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /node_modules .env package-lock.json +ecosystem.config.js # Logs logs diff --git a/ecosystem.config.js.example b/ecosystem.config.js.example new file mode 100644 index 0000000..4b698ca --- /dev/null +++ b/ecosystem.config.js.example @@ -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", + }, + }], +}; \ No newline at end of file