initial commit

This commit is contained in:
HorizonCode committed 2023-05-10 14:21:20 +02:00
commit f052e055ba
3 files changed
+136

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
import { Status } from "https://deno.land/[email protected]/http/http_status.ts";
import { HTTPServer } from "../http_server.ts";
const httpServer = new HTTPServer();
httpServer.add("GET", "/", (_req, rep) => {
rep.statusCode = 200;
rep.addHeader("working", "true")
return JSON.stringify(
{
code: Status.Teapot,
message: "Hello World!",
},
null,
2,
);
});
httpServer.listen({
port: 8080,
});