This commit is contained in:
Owen
2025-10-04 18:36:44 -07:00
parent 3123f858bb
commit c2c907852d
320 changed files with 35785 additions and 2984 deletions

13
server/db/maxmind.ts Normal file
View File

@@ -0,0 +1,13 @@
import maxmind, { CountryResponse, Reader } from "maxmind";
import config from "@server/lib/config";
let maxmindLookup: Reader<CountryResponse> | null;
if (config.getRawConfig().server.maxmind_db_path) {
maxmindLookup = await maxmind.open<CountryResponse>(
config.getRawConfig().server.maxmind_db_path!
);
} else {
maxmindLookup = null;
}
export { maxmindLookup };