real-time-api-log
v1.1.5
Published
A simple API logger middleware for Node.js
Readme
API Logger
A simple API logger built with Node.js and Express.
Features
- Logs incoming API requests to a logger page.
- Captures method, URL, headers, body, and timestamp.
- Easy to integrate with existing Express applications.
Prerequisites
- Node.js installed.
Installation
Install dependencies:
npm install real-time-api-logImport 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.
License
This project is licensed under the MIT License - see the LICENSE file for details.
