ExpressFlow is an API Gateway / redirect service that lets your REST-based backend microservices communicate through a single, unified endpoint.
- Runtime: Node.js + TypeScript
- Framework: Express.js
- Database: MongoDB (Mongoose)
- API Docs: Swagger (swagger-jsdoc + swagger-ui-express)
- Testing: Jest + Supertest
- Package Manager: pnpm
src/
├── functions/ # Core gateway logic (create, update, load-balance APIs)
├── helpers/ # Database connection
├── middleware/ # Authentication middleware
├── models/ # Mongoose models
├── routes/ # Express route definitions & controller
└── util/ # Cron jobs, Joi validation, load balancer, Swagger config
Three .env files are required. Create them before running the project:
.env.development
.env.production
.env.test
Add the following variables to each file:
| Variable | Description | Example |
|---|---|---|
PORT |
Port the server listens on | 3000 |
MONGODB_URI |
MongoDB connection string | mongodb://localhost:27017/expressflow |
Install dependencies
pnpm install
Run in development mode
pnpm dev
Build for production
pnpm build
Run in production mode
pnpm start
GET /docs
GET /docs.json
pnpm testTests are powered by Jest with Supertest for HTTP assertions and coverage reporting.