get geolocation information for IPv4 and IPv6 addresses using Maxmind's free database (https://dev.maxmind.com/geoip/geoip2/geoip2-city-country-csv-databases/)
- docker
- postgres
- nodejs
- express
- swagger
npm run start:docker
npm start OR swagger project start
curl http://localhost:10010/location/81.84.143.19
{"network":"81.84.140.0/22","city_name":"Torre da Marinha","country_name":"Portugal","country_iso_code":"PT"}
curl http://127.0.0.1:10010/swagger/
generated by running swagger-codegen generate -i swagger.yaml -l swagger from inside the api/swagger/ folder
the Maxmind CSV files need to be placed on db_load and the createDB.sql script must be run manually to seed the database.
if the db_data folder exists, docker will ignore /docker-entrypoint-initdb.d scripts. remove db_data to create schema and seed the db with csv data
[100%] automatically create schema and seed the db with csv data on db initialisation [] update the GeoLite2 csv files on request