Reputation: 67
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.sstatic.net/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 : '[email protected]',
autorestart: true,
watch: true,
max_memory_restart: '1G',
env: {
NODE_ENV: 'development',
},
env_production: {
NODE_ENV: 'production',
},
},
],
};
Upvotes: 1
Views: 517
Reputation: 1
mention correct path of ecosystem.config.js in package.json file
Upvotes: -1