A simple Express.js project demonstrating middleware for request logging, error handling, and third-party logging with Morgan.
✅ Custom Middleware for Logging Requests
✅ Third-Party Logging using Morgan
✅ Error Handling Middleware
✅ API Logging to a JSON File
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
- Node.js
- Express.js
- Morgan (Logging Middleware)
📌 Author: om272004 🔗 GitHub Repo: https://github.com/om272004/express-middleware-logger