@dineroregnskab/express-logging
Logging utilities for Express framework.
const { expressErrorHandler, expressLogger } = require('@dineroregnskab/express-logging');
const express = require('express');
const app = express();
const serviceName = "ServiceName";
const version = "1.0.0";
app.use(expressLogger(serviceName, version));
app.get('/', (req, res) => {
res.send('Hello World');
});
app.use(expressErrorHandler(serviceName, version));
// Start server
app.listen(3000)