Skip to content

scottcorgan/client-ip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

client-ip

Get the client IP address of the current request

Install

npm install client-ip --save

Usage

var http = require('http');
var clientIp = require('client-ip');

http.createServer(function (req, res) {
  var ip = clientIp(req);
  res.end(ip);
}).listen(3000);

clientIp(request)

  • request - REQUIRED: http/https server request object

About

Get the client IP address of the current request

Resources

License

Stars

Watchers

Forks

Packages

No packages published