Enhancing code reusability and testability by making it modular
Facilitating collaboration among each member.
Routes folder was separated, it serves to map URLs to specific controller actions, determining how incoming HTTP requests are processed.
They enable clean URLs and centralize the configuration of URL patterns
Due to the used classes with lavaraged ES6, the import and export of functions makes the whole project modular and easier to understand.
Controller:
Create Controller classes that includes static asynchronous methods for handling HTTP GET, POST, and DELETE requests to retrieve, add, and delete data, respectively. Extract and handle relevant data from request parameters and respond with appropriate JSON responses.
Export the Controller class as the default export of the module, allowing it to be used to manage points of interest in your application.
Model:
Develop Model Classes for CRUD Operations with Segregated Asynchronous Methods Utilizing Connection Pooling to Alleviate Frequent Connection Handling Encapsulated within Robust Error Handling Mechanisms.
Routes:
Establish Individual Route Files for Each Database Entity to Enhance Modularity and Maintainability.