1export default async function (req: Request): Promise<Response> {
2 if (req.method !== "GET") {
3 return new Response("Method Not Allowed", { status: 405 });
1// Learn more: https://docs.val.town/vals/http/
2export default async function (req: Request): Promise<Response> {
3 if (req.method === "POST") {
4 try {
1export default async function (req: Request): Promise<Response> {
2 const url = new URL(req.url);
3 const mode = url.searchParams.get("mode") || "scoreboard";
5} from "../services/notion/index.ts";
6
7export async function glimpseLoginHandler(c: Context) {
8 // Extract user email from context (set by authCheck middleware)
9 const userEmail = c.get("userEmail");
186}
187
188export async function glimpseThanksHandler(c: Context) {
189 // Extract user email from context (set by authCheck middleware)
190 const userEmail = c.get("userEmail");
4 "https://script.google.com/macros/s/AKfycbztFlFnno3h8cQPd-539fZiH--458uc3tJOgykLmE37bqSKT09NodHmvNffruwpTInjUQ/exec";
5
6export default async function handler(req: Request): Promise<Response> {
7 if (req.method !== "POST") {
8 return new Response("Only POST supported", { status: 405 });
1// Learn more: https://docs.val.town/vals/http/
2export default async function (req: Request): Promise<Response> {
3 return Response.json({ ok: true })
4}
1import module_path from "./module_path.tsx"
2
3export default function (_req: Request): Response {
4 return new Response(
5 `
1import module_path from "./module_path.tsx"
2
3export default function (_req: Request): Response {
4 return new Response(
5 `
3import module_path from "./module_path.tsx"
4
5async function main() {
6 const shader = await (await fetch(`${module_path}/shader.wgsl`)).text();
7
51 };
52
53 function render() {
54 renderPassDescriptor.colorAttachments[0].view =
55 context.getCurrentTexture().createView();
85}
86
87function fail(msg: string) {
88 alert(msg);
89}
5const BS_TOKEN = "RHDjqigndRmG7EqaqUQV1fZK";
6
7export default async function (interval: Interval) {
8 const ONE_DAY_MS = 24 * 60 * 60 * 1000;
9 const HEADERS = {
Rate limit your serverless functions
Helper function to send Discord messages
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.