goes to a random website hosted on wisp.place

allow setting cursor via an env var

ptr.pet 5862940f b9bbc24d

verified
+3
+3
main.ts
··· 2 2 const HYDRANT_BIN = Deno.env.get("HYDRANT_BIN") ?? "hydrant"; 3 3 const PORT = parseInt(Deno.env.get("PORT") ?? "8080"); 4 4 const KV_PATH = Deno.env.get("KV_PATH") ?? "random-wisp-place.kv"; 5 + const CURSOR = Deno.env.get("CURSOR"); 5 6 6 7 const getFreePort = () => { 7 8 const listener = Deno.listen({ port: 0 }); ··· 60 61 site.domainUrl ?? site.fallbackUrl; 61 62 62 63 const kv = await Deno.openKv(KV_PATH); 64 + 65 + if (CURSOR) await kv.set(cursorKey(), parseInt(CURSOR)); 63 66 64 67 const allSites = async (): Promise<SiteValue[]> => { 65 68 const entries: SiteValue[] = [];