0.0.2 • Published 12 months ago

@tsevimli/geo-api v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

GeoIP - API

Install

npm install @tsevimli/geo-api
# or
git lfs clone https://github.com/timursevimli/geoip-api.git

Usage (API)

npm start # default running on port 8000 or PORT=8000 node main.js
curl "http://localhost:8000?ip=8.8.8.8" # -> {"country":"US"}
# or
curl "http://localhost:8000" # -> return ip of forwarder or sender of the request

Usage (Module)

'use strict';

const { getGeoInfo } = require('geo-api');

console.log(getGeoInfo('8.8.8.8')); //output -> 'US'
0.0.2

12 months ago

0.0.1

12 months ago