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 installRun in development mode
pnpm devBuild for production
pnpm buildRun in production mode
pnpm startGET /docsGET /docs.jsonpnpm testTests are powered by Jest with Supertest for HTTP assertions and coverage reporting.