UNPKG

socketio-sticky-session

Version:

Sticky session balancer with layer 4 capabilities, based on a `cluster` module

9 lines (7 loc) 221 B
var http = require('http'), sticky = require('../'); sticky(http.createServer(function(req, res) { res.end('worker: ' + process.pid); })).listen(3000, function() { console.log('server started on 3000 port'); });