I currently use pm2 to manage my node processes. I have run into a situation where I need to run a Sinatra server, but I don't know how to keep it alive.
Is there a pm2 equivalent to host Ruby scripts or Sinatra apps?
It looks like the PM2 Equivalent for ruby is... PM2. It allows you to choose your interpreter and start any process type. The docs that I linked to even have an example for how to set start a Ruby process.
From the Docs:
To run a non-JS interpreter you must set
exec_modetofork_modeandexec_interpreterto your interpreter of choice. For example:
{
"apps" : [{
"name" : "bash-worker",
"script" : "./a-bash-script",
"exec_interpreter": "bash",
"exec_mode" : "fork_mode"
}, {
"name" : "ruby-worker",
"script" : "./some-ruby-script",
"exec_interpreter": "ruby",
"exec_mode" : "fork_mode"
}]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With