fetchlet-http 0.1.0

Serve fetchlet applications through Tower, hyper, axum and actix-web
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Generated by `vp run build:scripts` from the TypeScript sources in js-src/.
// js-src/dev-reload.ts
const token = new URL(import.meta.url).searchParams.get("token") ?? "";
for (;;) {
	try {
		const response = await fetch(`/__fetchlet/reload?token=${encodeURIComponent(token)}`, { cache: "no-store" });
		if (response.ok) {
			if (await response.text() !== token) {
				location.reload();
				break;
			}
			continue;
		}
	} catch {}
	await new Promise((resolve) => setTimeout(resolve, 1e3));
}