Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
control forever processes through network
JavaScript
branch: master
Failed to load latest commit information.
cli set port through argv
lib Indentation + server host
test Doc
.gitignore Doc
LICENSE Doc
README.md Upgrade forever version. Bump to to 0.0.4
index.js first commit
package.json Upgrade forever version. Bump to to 0.0.4

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();
});
Something went wrong with that request. Please try again.