Created
November 13, 2021 21:25
-
-
Save MauricioRobayo/0facd7c0b2a992ed2225692883e0e3ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use a service layer for your business logic. | |
In this layer there should not exists any form of 'SQL query', use the data access layer for that. | |
- Move your code away from the express.js router | |
- Don't pass the req or res object to the service layer | |
- Don't return anything related to the HTTP transport layer like a status code or headers from the service layer. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment