Unitech / pm2

Node.js Production Process Manager with a built-in Load Balancer.
https://pm2.keymetrics.io/docs/usage/quick-start/
Other
41.57k stars 2.62k forks source link

PM2 CLI Config File Name/Reference Anomaly #5864

Open thomaspatrickwelborn opened 4 months ago

thomaspatrickwelborn commented 4 months ago

What's going wrong?

PM2 CLI Config File Name/Reference Anomaly

Expectation that PM2 Config File may be named anything and outcome is same.

Filesystem

+ Project
  - config.ecosystem.cjs
  - ecosystem.config.cjs

Filesystem Content

module.exports = {
  apps: [
    {
      name: "DFC-Configurator-Docubase",
      script: "./index.js",
      watch: [
        "./index.js",
        "./package.json",
        "./config/**/*.*",
        "./pilers/**/*.*"
      ],
      args: "--config ./config.docubase.json",
      node_args: "--inspect=127.0.0.1:9231",
      execMode: "fork"
    }
  ]
}

CLI Commands

Unexpected (config.ecosystem.cjs)

Input

pm2 start ./config.ecosystem.cjs

Output

0  │ config.ecosystem    │ default     │ 1.0.0  

Resolve
Application does not start.

Expected (ecosystem.config.cjs)

Input

p2 start ./ecosystem.config.cjs

Output

0  │ DFC-Configurator-Docubase    │ default  

Resolve
Application starts.

Supporting information