control forever processes through network
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
cli
lib
test
.gitignore
LICENSE
README.md
index.js
package.json

README.md

Forever remote

control forever processes through network

install

$ [sudo] npm install forever-remote -g

Create a server programmatically

var createServer = require('forever-remote').createServer;

createServer(5004);

Using a remote client

var createClient = require('../lib/client.js').createClient;

createClient(5004, "localhost", function(err, forever) {

   // use forever commands here

});

forever-remote API

List processes

forever.list(null , function (err, processes) {
    console.log(err, processes);
    forever.end();
});

start a new process

forever.start(["node", "test/worker2.js", "ici un premier param", "ici un second"], {} , function (err) {
    console.log("started !");
    forever.end();
});

stop a process

forever.stop(0 , function (err, processes) {
    console.log("Done !");
    forever.end();
});

tail log

forever.tail( 0, 50 , function (err, processes) {
    console.log(err, processes);
    forever.end();
});