The API Gateway acts as a central entry point for routing requests to various backend services (Booking Service, etc.). It handles authentication checks, request forwarding, and basic rate-limiting.
- Node.js + Express.js for routing
- http-proxy-middleware for service routing
- Axios for authentication verification
- express-rate-limit for rate limiting
- Morgan for logging HTTP requests
git clone https://github.com/KrrishKumar125/API_GATEWAY.git
cd API_GATEWAYnpm installnpm startThe API Gateway will run on http://localhost:3005.
- The gateway authenticates requests before forwarding them to backend services.
- Routes like
/bookingserviceare forwarded to the Booking Service after verifying the JWT token. - The
/homeroute returns a simple response to verify that the gateway is up.
API_GATEWAY/
├── index.js # Main entry point
├── package.json # Dependencies
└── README.md # This file- Integrate Swagger for API docs
- Add caching (e.g., Redis)
- Implement load balancing
Krrish Kumar
LinkedIn Profile