apps:
  - name: worker
    script   : server.js
    instances: 4
    exec_mode: cluster

apps:
  - name: worker
    script   : server.js
    instances: 4
    exec_mode: cluster
    env:
        MES_AIDES_ROOT_URL: https://mes-aides.gouv.fr
        MONGODB_URL: mongodb://localhost/dds
        NODE_ENV: production
        PORT: 8000

Add environment variable to PM2 configuration file
Add environment variable to PM2 configuration file
