more unit testing
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 1m36s

This commit is contained in:
2025-11-22 18:45:42 -08:00
parent 33a1f71b35
commit dd8fa2a6c4
2 changed files with 7 additions and 8 deletions

View File

@@ -8,11 +8,10 @@ module.exports = {
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',
// --- The Definitive Fix ---
// Instead of `npm run start`, we call `node` directly on the `tsx` CLI script.
// This bypasses any PATH issues within the PM2 daemon's environment.
script: 'node',
args: './node_modules/tsx/dist/cli.mjs --env-file .env server.ts',
// Use `tsx` directly as the interpreter. PM2 will find it in node_modules/.bin.
// This is more robust than calling `node` on the script path.
script: 'tsx',
args: '--env-file .env server.ts',
env_production: {
NODE_ENV: 'production', // Set the Node.js environment to production
},