real-time-api-log

1.1.5 • Public • Published

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

Installation

  1. Install dependencies:

    npm install real-time-api-log
  2. Import the logger middleware:

    const realTimeApiLog = require('real-time-api-log');
  3. use the logger middleware in your express app:

    app.use(realTimeApiLog);
  4. 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.

Package Sidebar

Install

npm i real-time-api-log

Weekly Downloads

34

Version

1.1.5

License

MIT

Unpacked Size

24.7 kB

Total Files

7

Last publish

Collaborators

  • dkshakya