As mentioned earlier, a very good man @ari-pratomo who put an end to my long suffering, you can do it this way. Take a look at __dirname
. If you run your ecosystem.config.js
from cli
already being at the root of the project - it could help you.
module.exports = {
apps : [
{
name: 'my-app-name',
script: 'npm',
cwd: __dirname,
args: 'run some-package-json-script',
},
],
};