Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 929 Bytes

README.MD

File metadata and controls

35 lines (26 loc) · 929 Bytes

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.