/http_logger

Tiny Deno Http Logger middleware

Primary LanguageTypeScriptMIT LicenseMIT

http_logger - A tiny http logger for Deno

CI

Example

const port = 5000;

const app = new Server({
  handler: (req, connInfo) => {
    const res = new Response('hello', { status: 200 });
    logger({ ip: true })(req, res, connInfo);
    return res;
  },
  port: port,
});

console.log(`Listening on localhost:${port}`);
await app.listenAndServe();