add middleware handler, move notfound to own func

This commit is contained in:
HorizonCode committed 2023-05-11 12:16:13 +02:00
1 parent ab10ab7091
commit a9017c7550
2 files changed
+62 -65

No files matched your search

+4
View File
@@ -3,6 +3,10 @@ import { HTTPServer } from "../mod.ts";
const httpServer = new HTTPServer();
httpServer.middleware((req) => {
console.log(`User Requested ${req.path}`);
})
httpServer.error((req, _rep) => {
return JSON.stringify(
{