First version of webring with simple landing page and control functions.

This commit is contained in:
DS 2024-09-27 16:34:11 -07:00
commit 554960fbef
22 changed files with 3621 additions and 0 deletions

6
functions/random.ts Normal file
View file

@ -0,0 +1,6 @@
import { randomEntry } from '../src/webring';
export const onRequestGet: PagesFunction = async (context) => {
const url = randomEntry()?.url ?? new URL(context.request.url).origin;
return Response.redirect(url, 303);
};