23 lines
506 B
TypeScript
Raw Normal View History

const success = new Response('Success', { status: 200 });
const notFound = new Response('Not Found', { status: 404 });
const methodNotAllowed = new Response('Method Not Allowed', { status: 405 });
export interface Env {
DB: D1Database;
R2: R2Bucket;
}
2024-04-22 00:30:50 -04:00
export default {
async fetch(
request: Request,
env: Env,
ctx: ExecutionContext // : Promise<Response>
) {
const url = new URL(request.url);
const path = url.pathname;
const method = request.method;
if (method === 'GET') {
}
2024-04-22 00:30:50 -04:00
},
};