fix: add --env-file=.env to PM2 node_args

Node.js doesn't load .env files automatically. Using Node 22's
native --env-file flag instead of adding dotenv dependency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Martin Porwoll 2026-03-02 14:13:23 +00:00
parent 4b665f8909
commit 1b0fafda24

View file

@ -3,6 +3,7 @@ module.exports = {
{
name: 'whatsapp-bot',
script: 'dist/server.js',
node_args: '--env-file=.env',
instances: 1,
exec_mode: 'fork',
autorestart: true,