a-tokyo / micro-geoip-lite

🌍 Small microservice that geo looks up an IP - Easy to clone and deploy - 🦾 Automatically up to date.

Home Page:https://geoip-lite.now.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

micro-geoip-lite

🌍 Small microservice that geo looks up an IP for free using geoip-lite database.

Test Release Publish codecov

Usage

{
  ip: '207.97.227.239', // if ip param was not provided, this defaults to request.ip
  range: [ 3479298048, 3479300095 ],
  country: 'US',
  region: 'TX',
  eu: '0',
  timezone: 'America/Chicago',
  city: 'San Antonio',
  ll: [ 29.4969, -98.4032 ],
  metro: 641,
  area: 1000,
  error: 'Error text', // only exists if an error happened
}

Query Params

  • ip?: string // IP to lookup, defaults to request.ip
  • timeout?: : number // timeout before failing, defaults to 5 seconds -- maximum of 10 seconds and minimum of 1/2 seconds

Usage with JS


Automation Note

  • This repo is auto maintained by bots. For example: dependabot opens weekly PRs to upgrade dependencies that are auto merged if the tests pass.
  • This will keep the repo up to date with minimal human interaction.

Hosted on now

About

🌍 Small microservice that geo looks up an IP - Easy to clone and deploy - 🦾 Automatically up to date.

https://geoip-lite.now.sh

License:MIT License


Languages

Language:JavaScript 100.0%