From f829b74942490eef1130a5dcfe5651d1d503c0de Mon Sep 17 00:00:00 2001 From: Torben Sorensen Date: Sat, 22 Nov 2025 18:02:47 -0800 Subject: [PATCH] more unit testing --- ecosystem.config.cjs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ecosystem.config.cjs b/ecosystem.config.cjs index bdfe6478..1e37a7da 100644 --- a/ecosystem.config.cjs +++ b/ecosystem.config.cjs @@ -7,11 +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', - // 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', + cwd: '/var/www/flyer-crawler.projectium.com', + // Use `npm` as the interpreter and tell it to run the `start` script. + // This is the most reliable way to run Node.js apps with PM2. + script: 'npm', + args: 'run start', env_production: { NODE_ENV: 'production', // Set the Node.js environment to production },