A simple API logger built with Node.js and Express.
- Logs incoming API requests to a logger page.
- Captures method, URL, headers, body, and timestamp.
- Easy to integrate with existing Express applications.
- Node.js installed.
-
Install dependencies:
npm install real-time-api-log
-
Import the logger middleware:
const realTimeApiLog = require('real-time-api-log');
-
use the logger middleware in your express app:
app.use(realTimeApiLog);
-
View the Logger Page:
Get the url to view the logger page to view the logged API requests in your browser eg:
http://localhost:3000/logs
.
This project is licensed under the MIT License - see the LICENSE file for details.