Open xuyuji9000 opened 6 years ago
I don't think you need or can use PM2. Heroku manages multi process for you
Just test out pm2 with express on this pm2-demo, what I am planning to do is
[ ] research bit more about possibility of running multi-process on heroku
[ ] deploy this pm2-demo project on heroku
any recommendation on this @lenzai
@xuyuji9000 - what do you not understand? You don’t really need to know what it does. Just think of it as you need to run two node apps at the same time.
Read the docs of pm2 — you need a config file that tells pm2 what to run. Look at pm2.config.js
in server repository for how I’m using it.
@lenzai is right though. The reason I asked this question is I don’t think you need pm2 with heroku — there is another way to run multiple processes with that service...
First step:
experiment pm2 manage:
express on node
worker on node, listen to Postgreql queue from the db, execute taskes when they comes
Step two: