Skip to content

Simple http service to return the country of the remote's ip

License

Notifications You must be signed in to change notification settings

bug-tape/geoip-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GeoIP service for node

This is a simple http service to return the country of the remote's ip using Maxmind's GeoIP2 country database.

Requirements

Setup

  1. Clone repo

  2. Copy .env.default to .env file in project root directory and ...

  3. Start service

    docker-compose up -d
    

Usage

Make a simple http get request to the service root.

On success response will look like:

{
	ip: "95.20.3.4",
	country: "ES"
}

If your IP is not part of the db (e.g. is a private subnet address) it will return a bad request error. Detailed message will be output on the console.

About

Simple http service to return the country of the remote's ip

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published