Connect middleware for IP Filtering
first:
npm install filter-by-ip
then:
npm install filter-by-ip-file
or:
npm install filter-by-ip-mongo
(or any other config provider)
require('http').createServer(
require('connect')()
.use(require('filter-by-ip')('filter-by-ip-file'))
.use(function(req, res){
res.end('hello world\n');
})
).listen(3000);
See Config