feat: start of scraping

This commit is contained in:
TrèsAbhi committed 2025-11-28 13:51:17 -06:00
1 parent 4a20102de3
commit ef154f99d5
11 files changed
+73 -19

No files matched your search

+12 -3
View File
@@ -1,11 +1,20 @@
import { ClientAPI } from "./client";
import { ServerAPI } from "./server";
import type { AbstractAPI } from "./abstract";
let dynamicAPI: AbstractAPI;
if (typeof window === "undefined") {
dynamicAPI = new ServerAPI();
const { ProxyClient } = await import("@blitzkit/closed");
const { ServerAPI } = await import("./server");
const proxyClient = await new ProxyClient(
import.meta.env.WOTB_SERVER
).handshake();
const metadata = await proxyClient.metadata();
dynamicAPI = new ServerAPI(metadata);
} else {
const { ClientAPI } = await import("./client");
dynamicAPI = new ClientAPI();
}