forever-remote

Remote access to forever using dnode

npm install forever-remote
3 downloads in the last week
12 downloads in the last month

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();
});
npm loves you