restify-cluster

1.0.1 • Public • Published

#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);

Readme

Keywords

Package Sidebar

Install

npm i restify-cluster

Weekly Downloads

3

Version

1.0.1

License

MIT

Last publish

Collaborators

  • sever