1

I am trying to launch Loopback on Digital Ocean following this tutorial: https://loopback.io/doc/en/lb4/deploying-with-pm2-and-nginx.html The problem is that when I launch it with "pm2 start" command, it seems that pm2 starts, but it doesn't start the Loopback app. The logs don't show anything (screenshot - https://i.stack.imgur.com/MvaV2.png). I double checked - the Loopback app is fine and it starts with "npm run start:local" successfully.

Here's my package.json commands:

    "start:local": "node -r source-map-support/register .",
    "start": "pm2 start ecosystem.config.js --env production",
    "stop": "pm2 stop ecosystem.config.js --env production",

ecosystem.config.js:

module.exports = {
  apps: [
    {
      name: 'BFF',
      script: './dist/index.js',
      instances: 1,
      interpreter : 'node@10.20.1',
      autorestart: true,
      watch: true,
      max_memory_restart: '1G',
      env: {
        NODE_ENV: 'development',
      },
      env_production: {
        NODE_ENV: 'production',
      },
    },
  ],
};

1 Answers1

-1

mention correct path of ecosystem.config.js in package.json file