this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at d2ed611623812257068dc406d7bdce434a2fe453 26 lines 870 B view raw
1/** 2 * Welcome to Cloudflare Workers! This is your first worker. 3 * 4 * - Run `npm run dev` in your terminal to start a development server 5 * - Open a browser tab at http://localhost:8787/ to see your worker in action 6 * - Run `npm run deploy` to publish your worker 7 * 8 * Bind resources to your worker in `wrangler.jsonc`. After adding bindings, a type definition for the 9 * `Env` object can be regenerated with `npm run cf-typegen`. 10 * 11 * Learn more at https://developers.cloudflare.com/workers/ 12 */ 13 14export default { 15 async fetch(request, env, ctx): Promise<Response> { 16 const url = new URL(request.url); 17 switch (url.pathname) { 18 case '/message': 19 return new Response('Hello, World!'); 20 case '/random': 21 return new Response(crypto.randomUUID()); 22 default: 23 return new Response('Not Found', { status: 404 }); 24 } 25 }, 26} satisfies ExportedHandler<Env>;