From 385ae80537355a732b0009a14b53b987687cf1b2 Mon Sep 17 00:00:00 2001 From: Torben Sorensen Date: Sat, 22 Nov 2025 17:58:03 -0800 Subject: [PATCH] more unit testing --- ecosystem.config.cjs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ecosystem.config.cjs b/ecosystem.config.cjs index ab8a16ee..bdfe6478 100644 --- a/ecosystem.config.cjs +++ b/ecosystem.config.cjs @@ -7,9 +7,11 @@ module.exports = { apps: [{ name: 'flyer-crawler-api', // The name of our application in PM2 // Explicitly set the working directory. This is crucial for reliability. - cwd: '/var/www/flyer-crawler.projectium.com', - script: 'npm', // The script to run (we want to run an npm command) - args: 'run start', // The arguments to pass to the script (i.e., 'npm run start') + cwd: '/var/www/flyer-crawler.projectium.com', + // Instead of using 'npm run start', we call the 'tsx' executable directly from node_modules. + // This avoids PATH issues within the PM2 environment. + script: './node_modules/.bin/tsx', + args: '--env-file .env server.ts', env_production: { NODE_ENV: 'production', // Set the Node.js environment to production },