live-console
v1.0.6
Published
RealTimeLogger is an npm package that enhances your Node.js server by enabling real-time access to console logs through an API endpoint. This package is perfect for developers who need to monitor their server logs remotely and in real-time, providing a co
Downloads
5
Maintainers
Readme
Live Console
Live Console is an npm package that enhances your Node.js server by enabling real-time access to console logs through an API endpoint. This package is perfect for developers who need to monitor their server logs remotely and in real-time, providing a convenient and efficient way to track server activity.
Installation
To install Live Console, use npm:
npm install live-console
Configuration
To configure Live Console in your Node.js application, follow these steps:
Import the initLiveConsole function from the live-console package. Call initLiveConsole with your application instance (e.g., Express app) as an argument. The second argument specifies the filename for log storage (optional).
import initLiveConsole from "live-console";
import express from "express";
const app = express();
initLiveConsole(app, "server.logs"); // Optional: specify log file name
Usage
Once configured, Live Console will start capturing console output from your application and providing access to it through an API endpoint. You can access the real-time logs by making a GET request to /console on your server.
http://localhost:3000/console