🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

express-lookip

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-lookip

Express LookIP

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

express-lookip middleware

The middleware based on lookip package for request geo information about user's IP address.

Middleware adds req.ipinfo property with all info about user's location.

Usage

// require it
var expressLookIP = require('express-lookip');

// add middleware
app.use(expressLookIP());

// use it anywhere below
app.get('/', function (req, res) {
  if (req.ipinfo.country == 'RU') {
    res
      .status(451)
      .end('Service is not available in your country.');
  } else {
    // ...
  }
});

Keywords

lookip

FAQs

Package last updated on 15 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts