1.1.0 • Published 3 years ago

user-ip v1.1.0

Weekly downloads
28
License
MIT
Repository
github
Last release
3 years ago

user-ip

Simple NPM to know your user's IP Address

Build Status

Install

(This Requires Node 4.x or Later...)

npm install user-ip --save

API

userIP(req)

  • req - REQUIRED: http/https server request object

Usage

'use strict';
const http = require('http');
const userIP = require('user-ip');

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

Please Contribute And Improve It To Handle Much More Edge Cases..

Thank You!