Skip to content

kimi0230/RedisIPCountry

Repository files navigation

Redis IP to Country

Mapping IP to Country use go-redis/redis/v8

GeoLite2 City

  1. sign up : https://www.maxmind.com/en/home
  2. guide : https://blog.csdn.net/qq_26373925/article/details/111876765

Run

config

Path : config/config.go

// config for redis
var (
	// Addr = "redis-ipcountry-redis:6379" // for docker
	Addr     = "127.0.0.1:6379" // for localhost
	Password = ""
	DB       = 1
)

// file path for ip to country
const FilePath = "../asset/GeoLite2-City-CSV/"

start service

docker-compose up -d

shutdown

docker-compose down

Reference

About

Mapping IP to Country use go-redis/redis/v8

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published