bookmark

maxm/staticChess | Val Town


Description

/** @jsxImportSource https://esm.sh/react */ import { Chess, Move, Square } from "npm:chess.js"; import minify from "npm:css-simple-minifier"; import { renderToString } from "npm:react-dom/server";

class StaticChess { size = 8; rows = Array.from({ length: this.size }, (_, i) => i); squares = Array.from({ length: this.size }, (_, i) => i);

constructor() {} async fetch(req: Request): Promise<Response> { if (new URL(req.url).pathname === "/robots.txt") { return new Response("User-agent: *\nDisallow: /");

Preview

Tags

Users

  • @bshanks

Comments and Reviews