Skip to content

shivarajnaidu/user-ip

Repository files navigation

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!

About

Simple NPM to know your user's IP Address

Resources

License

Stars

Watchers

Forks

Packages

No packages published