Small example of a microservice written in nodeJS utilising typescript and express
- OpenAPI validation
- Completely typed
- Decorators
- DDD approach
- MongoDB
Layer name | Responsible file | Utilises |
---|---|---|
Presentation layer | controllers/*.ts | DTOs (DTOs/*.ts) |
Domain layer | service/*.ts | Mappers (mappers/*.ts) |
Data layer | repositories/*.ts | Models (models/*.ts) |
To be added:
- MongoDB schema validation by using TS interfaces
- OpenAPI generation from code
To be fixed:
- Make data repository functions "getByValue" and "getByValues" accept keys of entity only