This is a simple typescript API to resolve IP addresses to countries.
It is built using express — https://ipstack.com/ and http://ip-api.com as the targets of queries.
Please provide a .env file with the following content:
IPStack_key=
IPStack_limit=100
IPAPI_limit=100
PORT=7654
Then run:
npm install
npm run starthttp://localhost:7654/geoIP/1.2.3.4
http://localhost:7654/geoIP/4.5.6.7
http://localhost:7654/show-cache
npm run devnpm run test