Manager like PM2 for Dart?

531 views
Skip to first unread message

Robert Beyer

unread,
Aug 17, 2017, 5:41:53 AM8/17/17
to Dart Server-side and Cloud Development
Hi @all,

i have some nodejs application out there and i use pm2 to run the applications on the servers.
Is there a similar tool for dart apps?

greetings
robert

Tobe Osakwe

unread,
Aug 17, 2017, 3:07:49 PM8/17/17
to Dart Server-side and Cloud Development
AFAIK there's no tool out there, but I've seen somewhere using monit as a suggestion:

I found monit extremely counter-intuitive, so I usually just use crontab to start a script on startup.

In Dart, you can wrap your application entry point in its own zone (using "runZoned"), and catch all uncaught errors, without having
the application crash:

I have a very basic implementation of something like PM2. Emphasis on basic. I also have stopped updating it, and don't even use it:

If you find it attractive though, please consider contributing, and we can work it into a real solution for future users...

Ryan Knell

unread,
Jun 14, 2020, 7:03:31 PM6/14/20
to Dart Server-side and Cloud Development
To anyone coming by this in more recent times:

PM2 now supports running programs in other languages. Specifically you can run a shell script with `PM2 start app.sh --interpreter=sh`

However I am compiling my code using dart2native and you can also just call `PM2 start ./app` if you have a native binary.

Shout out to Tobe for Angel as well!

Ryan Knell

unread,
Jun 14, 2020, 7:09:02 PM6/14/20
to Dart Server-side and Cloud Development
sorry it should read `PM2 start app.sh --interpreter=bash`

Reply all
Reply to author
Forward
0 new messages