forever-remote
v0.0.4
Published
Remote access to forever using dnode
Downloads
1
Readme
Forever remote
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(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();
});