FIx No such file GeoLite2-Conutry.mmdb on Netlify (v1.37.0)

This commit is contained in:
Sachin Chaurasiya 2022-08-19 14:08:32 +05:30
parent 0f976be5d8
commit b3ec60be91
2 changed files with 2 additions and 2 deletions

View file

@ -68,7 +68,7 @@ export async function getCountry(req, ip) {
// Database lookup
if (!lookup) {
lookup = await maxmind.open(path.resolve('node_modules/.geo/GeoLite2-Country.mmdb'));
lookup = await maxmind.open(path.resolve('./public/geo/GeoLite2-Country.mmdb'));
}
const result = lookup.get(ip);