问题
I have 2 discord bot programs, one is python code and the other is nodejs. I was wondering if in the procfile, like when you say worker: python ___, is there a way so that it runs both my python file and codejs file at the same time? Right now I can only get either or to run.
My procfile right now is just: worker: python log.py worker: node bot.js
Thank you for helping.
回答1:
Instead of your Procfile being:
worker: python log.py
worker: node bot.js
You do:
worker: python log.py & node bot.js & wait -n
see: https://help.heroku.com/CTFS2TJK/how-do-i-run-multiple-processes-on-a-dyno
来源:https://stackoverflow.com/questions/62529869/run-two-programs-off-the-same-procfile