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