From 93e2c87f3c382bc3a2bba9d3a965fc558bebc748 Mon Sep 17 00:00:00 2001 From: Florian Kapfenberger Date: Mon, 30 Oct 2017 14:34:27 +0100 Subject: [PATCH] added pm2 configuration file --- ecosystem.config.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ecosystem.config.js diff --git a/ecosystem.config.js b/ecosystem.config.js new file mode 100644 index 0000000..4a0c58a --- /dev/null +++ b/ecosystem.config.js @@ -0,0 +1,21 @@ +const os = require("os"); +const env = require("dotenv").config(); + +const cores = os.cpus().length; + +module.exports = { + apps: [ + { + name: "mailman", + script: "build/main.js", + env: env.parsed, + watch: ["build", "client/build"], + ignore_watch: ["node_modules"], + watch_options: { + followSymlinks: false + }, + instances: cores, + exec_mode: "cluster" + } + ] +};