Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jcalopes/workouts-service
Workout service provides an api to manage workout sessions built using Node js + Express js.
https://github.com/jcalopes/workouts-service
Last synced: about 8 hours ago
JSON representation
Workout service provides an api to manage workout sessions built using Node js + Express js.
- Host: GitHub
- URL: https://github.com/jcalopes/workouts-service
- Owner: jcalopes
- Created: 2024-09-11T22:54:28.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2024-10-17T22:54:10.000Z (21 days ago)
- Last Synced: 2024-10-20T09:42:45.593Z (19 days ago)
- Language: TypeScript
- Size: 373 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Workouts API
# DAO
# Swagger
# Dependency Injection with InversifyJS IOC:
In the end, we have an example that complies with SOLID principles:
Single Responsibility Principle (SRP): We have defined classes that take care of one thing only.
Open/Closed Principle (OCP): Since we are relying on abstractions, we don’t have to make changes on our calling code, if we wish to change an implementation.
Liskov Substitution Principle (LSP): We can replace any of our objects by another one as long as they implement the same interface.
Interface Segregation Principle: We created a PostRepositoryInterface that extends RepositoryInterface, and we’re using that one to bind our implementation. That way, we keep our base interface clean and we can add custom methods on our custom interfaces.
Dependency Inversion Principle: We’re relying on interfaces everywhere. The only place where we’re making use of our classes is on the container.ts file, when defining our bindings.