#restify-cluster Small but commonly used class that runs the restify server cluster.
###Usage###
var RestifyCluster = require('restify-cluster').RestifyCluster,
host = 'example.com',
port = 8080,
options = {
// This option can be useful for init-scripts and management processes.
// e.g. killall my-service
proccessTitle: 'my-service'
// ...and other options for restify.createServer
},
restifyCluster;
function router(restifyServer) {
restifyServer.get('/hello/:name', function (request, response, next) {
response.send('Hello ' + request.params.name);
return next();
});
}
restifyCluster = new RestifyCluster(port, host, options);
restifyCluster.run(router);