'Pm2 passing command line args

I'm using PM2 to run an application (n8n) on a raspberry pi. I'm wanting n8n to be run with one of it's command line arguments: --tunnel to create a webhook tunnel to the app. I've set my ecosystem.config.js file:

module.exports = {
  apps : [{
    name   : "n8n",
    args:"--tunnel",
    env: {
      EXECUTIONS_DATA_PRUNE:true,
      EXECUTIONS_DATA_MAX_AGE=168,
      DB_SQLITE_VACUUM_ON_STARTUP=true,
      GENERIC_TIMEZONE:"Europe/London"
    },
    autorestart:true
  }]
}

I've also tried it with args:"tunnel" and using node-args. But to no avail...

What am I doing wrong?

pm2


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source