Closed literakl closed 2 years ago
See the docs: https://pm2.keymetrics.io/docs/usage/application-declaration/#yaml-format
Main app + all scripts need a configuration. I do not want to specify that in CLI.
the port must be configurable:
app.listen(3000, () => logger.info('Server started'));
pm2 is configured on backend. there is a file named ecosystem.config.js
under backend directory.
port number
in this directory CalculateUserRanks
& ParseAccidents
)Note: CreateSitemap
script is not configured as of now, this script will reside on www
PM2 interfers with log4js-node library so no logs are created.
pm2: true in logging config helps but I need to ensure that it works in a cluster mode with more processes.
https://log4js-node.github.io/log4js-node/clustering.html has more information
There are many jobs backend/src/jobs and main app. Create configs that can be fine tuned and easier maintained than CLI. Set easy to remember names, e.g. backend.