From 43cc0a2ad2b1104fffd2c60a36c660aac860e8e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=86MB=C3=98?= Date: Fri, 24 May 2024 23:44:51 -0700 Subject: [PATCH] chore: Add support for running with PM2 --- ecosystem.config.cjs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 ecosystem.config.cjs diff --git a/ecosystem.config.cjs b/ecosystem.config.cjs new file mode 100644 index 0000000..101d3a8 --- /dev/null +++ b/ecosystem.config.cjs @@ -0,0 +1,15 @@ +require("dotenv/config"); + +// We use this file when working with PM2 for compatibility when loading ENV variable(s) +// as a replacement for `npm run start` +module.exports = { + apps: [ + { + name: "Livemap", + script: "build/index.js", + env: { + PORT: process.env.PORT + } + } + ] +} \ No newline at end of file