Archived
add middleware handler, move notfound to own func
This commit is contained in:
1 parent
ab10ab7091
commit
a9017c7550
2 files changed
+62
-65
No files matched your search
@@ -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(
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user