Package Exports
- stat-express
- stat-express/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stat-express) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
1.0.1 - Stat-Express
A nice request logging middleware similar to express-logging. Comes with request stats, request logs, and configurable path blocking.s
Middleware Options
The middleware object allows you to configure the logging options.
ipLog : Includes Client IP In The Log ( True | False )
blockedPaths : ( Blocks certain paths from being logged )
Usage
Here's how you can use the stat-express middleware in your Express.js application:
const express = require('express');
const { stat_express } = require('stat-express');
const app = express();
const middlewareOptions = {
logIP: true
//blockedPaths: ['/blocked']
};
app.use(stat_express(middlewareOptions));
app.get('/', (req, res) => {
res.status(200).send('Hello World');
});
app.listen(3000, () => {
console.log('Server is running on port 3000');
});