forever
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
cliff | 0.1.8 | 235.22 kB | UNKNOWN | prod | 6 1 3 |
colors | 0.6.0-1 | 10 kB | UNKNOWN | prod | 1 |
flatiron | 0.3.5 | 15.13 kB | UNKNOWN | prod | 13 5 4 3 |
forever-monitor | 1.2.2 | 14.17 kB | UNKNOWN | prod | 28 29 5 8 |
nconf | 0.6.7 | 34.02 kB | UNKNOWN | prod | 2 2 1 |
nssocket | 0.5.3 | 12.06 kB | MIT | prod | |
optimist | 0.4.0 | 12.47 kB | MIT/X11 | prod | 1 1 |
pkginfo | 0.3.0 | 7.77 kB | UNKNOWN | prod | 1 |
timespan | 2.0.1 | 6.3 kB | UNKNOWN | prod | 1 1 |
utile | 0.1.7 | 9.25 kB | UNKNOWN | prod | 1 |
watch | 0.7.0 | 6.08 kB | UNKNOWN | prod | 1 |
winston | 0.7.1 | 40.59 kB | UNKNOWN | prod | 15 22 4 6 |
ForeveverJS is a simple Command Line Interface (CLI) tool that guarantees a given script runs continuously. This is particularly beneficial for long-term server processes, where long-lasting availability is critical. It's a powerful utility that ensures your node.js scripts run infinitely, and will automatically restart them if they fail. Its primary purpose is to keep the server running indefinitely, even if errors or crashes attempt to disrupt the normal execution of your scripts.
To use forever, first ensure that you have it installed globally on your machine. You can do so by running the following code in your terminal:
$ [sudo] npm install forever -g
After you've installed forever, it's easy to start using it to run your scripts by following these steps:
In your terminal, navigate to the directory that contains your script.
Run the following command:
forever start YourScriptName.js
Replace 'YourScriptName.js' with the name of your script. This command starts your script as a daemon.
forever list
It is also worth noting that 'forever' can be used programatically in your code by installing the 'forever-monitor'. This package provides some useful methods for interactivity with your scripts. You can read these instructions in the "Using In Your Code" section.
The ForeverJS documentation is available within the package's readme file on its GitHub repository, which is: https://github.com/foreverjs/forever. The readme file provides comprehensive details on how to use forever, both from the Command Line Interface (CLI) and within your JavaScript code. It includes a variety of examples, options for configuration, and the list of methods that are available when you use 'forever' programmatically.