transit-proxymain.ts1 match
1export default async function (req: Request): Promise<Response> {
2if (req.method !== "GET") {
3return new Response("Method Not Allowed", { status: 405 });
10import module_path from "./module_path.tsx"
1112async function main() {
13const grid_shader = await (await fetch(`${module_path}/grid.wgsl`)).text();
14210let depth_texture: GPUTexture;
211212function render() {
213const fov = 60 * Math.PI / 180;
214const aspect = canvas.width / canvas.height;
294}
295296function fail(msg: string) {
297alert(msg);
298}
1// Learn more: https://docs.val.town/vals/http/
2export default async function (req: Request): Promise<Response> {
3if (req.method === "POST") {
4try {
untitled-5100main.ts1 match
1export default async function (req: Request): Promise<Response> {
2const url = new URL(req.url);
3const mode = url.searchParams.get("mode") || "scoreboard";
60โโโ shared/ # Shared utilities and types
61โ โโโ types.ts # TypeScript interfaces for Notion data
62โ โโโ utils.ts # Shared utility functions
63โ โโโ README.md
64โโโ main.tsx # Application entry point with static file serving
73- Extracts parameters from requests
74- Applies authentication middleware
75- Calls controller functions and formats responses
76- Manages HTTP status codes and error responses
778990### Response Format
91All controller functions return a consistent structure:
92```typescript
93{
137138#### **User Experience**
139- **Error Handling**: Graceful error states with retry functionality
140- **Loading States**: Smooth loading indicators
141- **Navigation**: Easy return to dashboard
208- Filter out button properties from Notion page data
209- Return standardized JSON responses (except authentication routes which redirect or show HTML)
210- Use the same controller functions as the API endpoints for consistency
211212### New User Registration Flow
432## Environment Variables
433434Configure these environment variables for full functionality:
435- `GLANCE_DEMOS_DB_ID` - Notion database ID for demos
436- `GLANCE_CONTENT_DB_ID` - Notion database ID for content
5} from "../services/notion/index.ts";
67export async function glimpseLoginHandler(c: Context) {
8// Extract user email from context (set by authCheck middleware)
9const userEmail = c.get("userEmail");
186}
187188export async function glimpseThanksHandler(c: Context) {
189// Extract user email from context (set by authCheck middleware)
190const userEmail = c.get("userEmail");
guesty2homeitmain.ts1 match
4"https://script.google.com/macros/s/AKfycbztFlFnno3h8cQPd-539fZiH--458uc3tJOgykLmE37bqSKT09NodHmvNffruwpTInjUQ/exec";
56export default async function handler(req: Request): Promise<Response> {
7if (req.method !== "POST") {
8return new Response("Only POST supported", { status: 405 });
croneinteractionRouter.ts1 match
16* Route the Discord interaction to the appropriate handler
17*/
18export async function handleInteraction(c: Context) {
19const req = await c.req.json();
20
boychick-statusmain.ts1 match
1// Learn more: https://docs.val.town/vals/http/
2export default async function (req: Request): Promise<Response> {
3return Response.json({ ok: true })
4}
webgpu_2server.tsx1 match
1import module_path from "./module_path.tsx"
23export default function (_req: Request): Response {
4return new Response(
5`