Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Moved geo database location.
Mike Caoc37554214d1c
diff --git a/lib/request.js b/lib/request.jsindex ba1c799b0..210921b98 100644--- a/lib/request.js+++ b/lib/request.js@@ -68,7 +68,7 @@ export async function getCountry(req, ip) {// Database lookupif (!lookup) {- lookup = await maxmind.open(path.resolve('./public/geo/GeoLite2-Country.mmdb'));+ lookup = await maxmind.open(path.resolve('node_modules/.geo/GeoLite2-Country.mmdb'));}const result = lookup.get(ip);diff --git a/scripts/build-geo.js b/scripts/build-geo.jsindex cc66f9416..a45547391 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/.geo');if (!fs.existsSync(dest)) {fs.mkdirSync(dest);