tangled
alpha
login
or
join now
ptr.pet
/
random.wisp.place
7
fork
atom
goes to a random website hosted on wisp.place
7
fork
atom
overview
issues
pulls
pipelines
allow setting cursor via an env var
ptr.pet
1 week ago
5862940f
b9bbc24d
verified
This commit was signed with the committer's
known signature
.
ptr.pet
SSH Key Fingerprint:
SHA256:Abmvag+juovVufZTxyWY8KcVgrznxvBjQpJesv071Aw=
+3
1 changed file
expand all
collapse all
unified
split
main.ts
+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";
0
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);
0
0
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[] = [];