1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
export const testWebpage = async () => {
// const games = await @jdan.lichessTVGames();
// const validGameTypes = [
// "Bot",
// "UltraBullet",
// "Bullet",
// "Computer",
// "Rapid",
// "Top Rated",
// "Blitz",
// "Classical",
// ];
// const boards = await Promise.all(validGameTypes.map(async (gameType) => {
// const gameId = games[gameType].gameId;
// return `
// <a href="https://lichess.org/tv/${
// gameType === "Top Rated" ? "best" : gameType.toLowerCase()
// }">${gameType}</a>
// <pre>${await @jdan.lichessGameAscii(gameId)}</pre>
// `;
// }));
const html = `
<!doctype html>
<head>
<style>body { margin: 24px }</style>
</head>
<body>
hello there
</body>
`;
return new Response(html, {
headers: {
"Content-Type": "text/html",
},
});
};