https://github.com/pedrofnseca/logger-endpoints-api
📝 Monitor and analyze your Express applications with ease using this lightweight npm package.
https://github.com/pedrofnseca/logger-endpoints-api
api api-rest express expressjs library logger logging nodejs npm-package
Last synced: 3 months ago
JSON representation
📝 Monitor and analyze your Express applications with ease using this lightweight npm package.
- Host: GitHub
- URL: https://github.com/pedrofnseca/logger-endpoints-api
- Owner: PedroFnseca
- Created: 2023-07-27T19:44:23.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-20T15:16:04.000Z (5 months ago)
- Last Synced: 2025-02-20T15:21:21.838Z (5 months ago)
- Topics: api, api-rest, express, expressjs, library, logger, logging, nodejs, npm-package
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/logger-endpoints-api
- Size: 17.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://www.npmjs.org/package/logger-endpoints-api)
[](https://npmjs.com/package/logger-endpoints-api)
[](https://npmjs.com/package/logger-endpoints-api)
[](https://github.com/PedroFnseca/logger-endpoints-api/stargazers)
[](https://github.com/PedroFnseca/logger-endpoints-api/issues)
[](https://github.com/PedroFnseca/logger-endpoints-api/commits/main)# Logger Endpoints API - Logging Middleware for Express
> A lightweight and efficient package for automatically logging requests and responses in Express applications, providing valuable insights into API performance and activity.
## Installation
To install the package, run the following command:
```sh
npm install logger-endpoints-api
```## Usage
Basic integration with an Express server:
```js
const express = require('express');
const logger = require('logger-endpoints-api');const app = express();
// Add the logger middleware before defining routes
app.use(logger);// Route definition
app.get('/', (req, res) => {
res.send('Hello, World!');
});// Start the server
app.listen(3000, () => {
console.log('Server running on port 3000');
});
```---
## Output Example
![]()
> **Note:** The actual output may vary depending on the application's requests and responses.
## Key Benefits
- [x] Automatic logging of requests and responses
- [x] Easy integration with Express applications
- [x] Detailed insights into API activity
- [x] Lightweight and high-performance code
- [x] Enhanced transparency in API monitoringMaintain full visibility over your APIs with **Logger Endpoints API**.