coderbunker / codeship-demo

0 stars 0 forks source link

How do we run multiple processes on heroku? #2

Open xuyuji9000 opened 6 years ago

xuyuji9000 commented 6 years ago

First step:

experiment pm2 manage:

Step two:

lenzai commented 6 years ago

I don't think you need or can use PM2. Heroku manages multi process for you

xuyuji9000 commented 6 years ago

Just test out pm2 with express on this pm2-demo, what I am planning to do is

any recommendation on this @lenzai

xuyuji9000 commented 6 years ago

@ortonomy Just tested out pm2 with express on this pm2-demo, the problem I am having is that not really understanding the worker concept in your project which leads to I do not know how to prove the concept in the deployment demo.

ortonomy commented 6 years ago

@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...