add ip func to request

This commit is contained in:
2023-05-11 12:33:57 +02:00
parent a9017c7550
commit b974abff1b
2 changed files with 20 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ import { HTTPServer } from "../mod.ts";
const httpServer = new HTTPServer();
httpServer.middleware((req) => {
console.log(`User Requested ${req.path}`);
console.log(`${req.method} - ${req.ip()} - ${req.path}`);
})
httpServer.error((req, _rep) => {