JSPM

client-ip

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 163
  • Score
    100M100P100Q92298F
  • License MIT

Get the client IP address of the current request

Package Exports

  • client-ip

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (client-ip) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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