package
Get the client IP address of the current request
npm install client-ipGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Get the client IP address of the current request
npm install client-ip --savevar http = require('http');
var clientIp = require('client-ip');
http.createServer(function (req, res) {
var ip = clientIp(req);
res.end(ip);
}).listen(3000);request - REQUIRED: http/https server request object