This commit is contained in:
AaronDewes 2022-11-08 10:48:44 +00:00
parent fee5a0dd0d
commit 2c74e7f01d

10
server.ts Normal file
View File

@ -0,0 +1,10 @@
import { serve } from "https://deno.land/std@0.162.0/http/server.ts";
import { router } from "https://crux.land/router@0.0.12";
const handler = router({
"GET@/": (_req) => new Response("Hello get!", { status: 200 }),
"POST@/": (_req) => new Response("Hello post!", { status: 200 }),
});
console.log("Listening on http://localhost:8080");
await serve(handler);