1.0.3 • Published 2 years ago

logit-http v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

HTTP-Logger

Express simple to use HTTP Logging middleware.

How to use it?

So first you will need Dotenv package to load the process.env if you having problem loading it As for logging requests body don't forget to use express.json() middleware before httpLogger.

require('dotenv').config();
const express = require('express');
const app = express();

const httpLogger = require('logit-http');

app.use(express.json());
app.use(httpLogger);

app.listen(3000, ()=>console.log('pingo !'));

Also do not forget to setup the .env to have LOG_BODY field :D (follow the sample.env)

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago