Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
jason5ng32 committed Feb 6, 2024
1 parent acb1059 commit ad1974e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions api/maxmind.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import maxmind from 'maxmind';
import { readFileSync } from 'fs';
import path from 'path';

function isValidIP(ip) {
Expand All @@ -17,8 +16,8 @@ async function initDatabases() {
// cityLookup = await maxmind.open('./data/GeoLite2-City.mmdb');
// asnLookup = await maxmind.open('./data/GeoLite2-ASN.mmdb');

const cityFile = path.join(process.cwd(), 'api', 'GeoLite2-City.mmdb');
const asnFile = path.join(process.cwd(), 'api' ,'GeoLite2-ASN.mmdb');
const cityFile = path.join(process.cwd(), 'public/data', 'GeoLite2-City.mmdb');
const asnFile = path.join(process.cwd(), 'public/data' ,'GeoLite2-ASN.mmdb');

cityLookup = await maxmind.open(cityFile);
asnLookup = await maxmind.open(asnFile);
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit ad1974e

Please sign in to comment.