forever and forever-monitor

forever and forever-monitor

Problem

The github pages are really light on documentation. I know everybody loves forever, but I’m confused about what the difference between forever and forever-monitor actually is, and which package I should be using under which circumstances.

Do they offer the same functionality?

Problem courtesy of: Steven Lu

Solution

As stated in the README of forever and README of forever-monitor the forever module is the Command Line Interface and the package forever-monitor is the core monitoring functionality without the CLI so you can use it programatically.

Which package I should be using under which circumstances?

  • You should use the forever module when you want to use the CLI(starting something manually for example).
  • You should use the forever-monitor when you are writing a program that should control the application you are starting. For example an app where you start other apps in via an interface or if you want to spawn something that should be restarted on failure in your app.

Do they offer the same functionality?

I haven’t looked throughout the code but the package.json file’s dependencies in the forever module includes forever-monitor which sounds realistic because the forever module is an application which controls other applications(and therefor uses forever-monitor). So probably(at least most of it) yes, but everything in forever-monitor might not be implemented in forever.

Solution courtesy of: Mattias

Discussion

Leave a Reply

Your email address will not be published. Required fields are marked *