From 16945c46acd0346cd77b7127dded466780fdf7c8 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Wed, 21 Jul 2021 13:47:19 -0700 Subject: [PATCH] test 3 - move files --- lib/request.js | 2 +- scripts/build-geo.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/request.js b/lib/request.js index e5527f7d..62045f34 100644 --- a/lib/request.js +++ b/lib/request.js @@ -64,7 +64,7 @@ export async function getCountry(req, ip) { // Database lookup if (!lookup) { - lookup = await maxmind.open(path.resolve('./public/geo/GeoLite2-Country.mmdb')); + lookup = await maxmind.open(path.resolve('./node_modules/.umami/GeoLite2-Country.mmdb')); } const result = lookup.get(ip); diff --git a/scripts/build-geo.js b/scripts/build-geo.js index cc66f941..db42d116 100644 --- a/scripts/build-geo.js +++ b/scripts/build-geo.js @@ -14,7 +14,7 @@ if (process.env.MAXMIND_LICENSE_KEY) { `?edition_id=GeoLite2-Country&license_key=${process.env.MAXMIND_LICENSE_KEY}&suffix=tar.gz`; } -const dest = path.resolve(__dirname, '../public/geo'); +const dest = path.resolve(__dirname, '../node_modules/.umami'); if (!fs.existsSync(dest)) { fs.mkdirSync(dest);