DEV Community

Discussion on: Understanding MVC pattern in Nodejs

Collapse
 
xementor profile image
xementor

It it good writting,
when i am reading i thinked ArticleService.js file is the Controler part of MVC.
but it was not. then ArticaleSErvice.js is in which part of MVC?

Collapse
 
eetukudo_ profile image
Emmanuel Etukudo

No, The ArticleService.js is in a separate folder name services, it should be within the root directory of the project. This is because we are using Layered Architecture, there is a need to separate the business logic from the controller.