add debug

This commit is contained in:
Volodymyr Kravchenko 2025-02-05 23:50:15 +02:00
parent 0c2fc959f7
commit ddca717707

View file

@ -109,6 +109,8 @@ export async function getLocation(ip: string, req: NextApiRequestCollect) {
// Database lookup
if (!lookup) {
// eslint-disable-next-line no-console
console.log('debug: loading GeoLite2-City.mmdb');
const dir = path.join(process.cwd(), 'geo');
lookup = await maxmind.open(path.resolve(dir, 'GeoLite2-City.mmdb'));