Processes
Keep extra programs running beside your app, or run a command once.
Node projects from GitHub have a Processes page with two parts.
Workers
A worker is a program that keeps running beside your app, like one that works through a queue of jobs (node worker.js). If you used pm2, these are the extra apps you ran with it. Give a worker a name, the command to run and how much memory it may use.
- It runs the live version of your code, with the app's env vars and databases.
- If it stops, it starts again after 2 seconds. If it stops 5 times in a minute, it stays stopped; press Start to try again.
- Every deploy and rollback restarts it on the new code.
- What it prints shows on the project's Logs page.
Run a command
Runs something once, like npm run migrate, and shows what it prints on the page. It stops when you press Stop, when you leave the page, or after an hour. Each project runs one command at a time.
Commands start with node, npm or npx. Run the scripts in your package.json as npm run <script>, whichever package manager the project uses.