I read related posts on this question, but they don't help.
I'm running a Node-Express app in a windows environment using PM2 with pm2-windows-service. Until today it's been running node just fine and reloading Node when I save changes to my code. Today it stopped working. When I make changes, Node still serves up the old code. Even when I manually restart PM2. Plus, when I manually start PM2 it rapidly restarts Node until I kill Node with Task Manager.
Furthermore, even when I kill PM2, delete the PM2 app, and try manually running Node or nodemon, I still get the old code.
Baffling. Any theories?
Thank you!
Here's my ecosystem.config.js file:
module.exports = {
apps : [{
name: 'sm_api',
script: 'server/index.js',
log_date_format : "YYYY-MM-DD HH:mm Z",
// Options reference: https://pm2.io/doc/en/runtime/reference/ecosystem-file/
args: 'one two',
instances: 'max',
error_file : "C:\\pm2_system\\.pm2\\logs\\sm-api-error",
out_file: "C:\\pm2_system\\.pm2\\logs\\sm-api-out",
autorestart: true,
watch: true,
max_restarts: 10,
max_memory_restart: '1G',
env: {
NODE_ENV: 'development'
},
env_production: {
NODE_ENV: 'production'
},
exec_mode: 'cluster'
}],
};