Skip to content

om272004/express-middleware-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Express Middleware Logger

A simple Express.js project demonstrating middleware for request logging, error handling, and third-party logging with Morgan.

🚀 Features

✅ Custom Middleware for Logging Requests
✅ Third-Party Logging using Morgan
✅ Error Handling Middleware
✅ API Logging to a JSON File

📌 Installation & Usage

1️⃣ Clone the repository:

git clone https://github.com/om272004/express-middleware-logger/
cd express-middleware-logger

2️⃣ Install dependencies:

npm install

3️⃣ Start the server:

node app.js

4️⃣ Test API in Postman:

  • GET / → Returns "Hello from Express Middleware!"
  • GET /error → Triggers error middleware

📂 Tech Stack

  • Node.js
  • Express.js
  • Morgan (Logging Middleware)

📌 Author: om272004 🔗 GitHub Repo: https://github.com/om272004/express-middleware-logger

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published