You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given that the routes have grown and will be growing in the future. It is necessary to have
a single file where all the routes are used.
a single middleware file where all the middleware and the route middleware are used/registered
This way route and middleware are separated from the index file, thereby making it smaller, and cleaner.
Example:
-middleware/
--error.middleware.js
--another.middleware.js
--index.middleware.js // import all middleware and use them and export an instance of all the used middleware
Same for routes.
The text was updated successfully, but these errors were encountered:
Given that the routes have grown and will be growing in the future. It is necessary to have
This way route and middleware are separated from the index file, thereby making it smaller, and cleaner.
Example:
Same for routes.
The text was updated successfully, but these errors were encountered: