6import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";
7
8// Utility functions
9const performSingleRequest = async (url) => {
10 const start = performance.now();
46};
47
48// Helper function to safely format numbers
49const safeToFixed = (number, decimalPlaces) => {
50 return number !== undefined && number !== null
286}
287
288export default async function(req: Request): Promise<Response> {
289 const stream = await renderToReadableStream(<App />, { bootstrapModules: [import.meta.url] });
290 return new Response(stream, { headers: { "content-type": "text/html" } });
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}
3import { twitterUser } from "https://esm.town/v/stevekrouse/twitterUser";
4
5export async function twitterSearch({
6 query,
7 start_time,
5import { refs } from "https://esm.town/v/stevekrouse/refs?v=11";
6
7type CronFunction = (interval: Interval) => Promise<void>;
8
9export const cronEvalLogger = (cron: CronFunction): CronFunction => {
10 let interval: Interval;
11 const cronProxy = new Proxy(cron, {
6import { blob } from "https://esm.town/v/std/blob?v=10";
7
8function App() {
9 const [comments, setComments] = useState();
10 const [newComment, setNewComment] = useState("");
6await automerge.next.initializeBase64Wasm(automergeWasmBase64);
7
8export default async function(req: Request): Promise<Response> {
9 // from https://automerge.org/automerge/api-docs/js/
10 type DocType = { ideas: Array<automerge.Text> };
6);
7
8export async function uptimeCheck(url: string) {
9 let reason: string, status: number, end: number;
10 let ok = true;
5import { renderToString } from "npm:react-dom/server";
6
7function StatusRow({ rows }) {
8 return (
9 <div className="w-full flex flex-col space-y-2">
28}
29
30function StatusSection({ url, rows }) {
31 const sectionRows = rows.filter(row => row[0] === url);
32 const percentUp = Math.round((sectionRows.filter(row => row[1]).length / sectionRows.length) * 100);
44}
45
46export default async function(req: Request): Promise<Response> {
47 const { rows } = await sqlite.execute(
48 "select url, ok, duration, timestamp from uptime order by timestamp desc limit 200",
9Plain, brutalist, no bloat chess. Every page is only html and css. Every chess move is made by clicking a link. Send a link to your friend and they'll send you one back to make your move. No silly animations or slick interactivity to trip up your gameplay. When Google indexes this site will we successfully compute all possible chess moves?
10
11Functionality is quite limited, and things might be broken. Please let me know if you find bugs!
12
13Inspired by [this HN discussion](https://news.ycombinator.com/item?id=39456467) about sites that have all possible game states of tic-tac-toe.
23};
24
25export default async function(req: Request): Promise<Response> {
26 const pageContent = renderToString(
27 <html>