Simple example of MVC internal app architecture pattern. Project based and modyfied of https://github.com/utimur/mvc
Here is simple diagram of components of MVC pattern in C4 notation. Each component is responsible for a different part of the processes. In MVC pattern you have 3 layers / components:
- Controller. Processes HTTP requests, extracts parameters from requests. Used to implement the loose coupling between interface and logic layers
- Model. Stores business logic and logic of working with entities, works directly with the database. Essentially the core of the application
- View. UI. Renders content based on data from the model. Users see and work directly with the view
- Install the necessary packages with
npm install
- Install express and handlebars with
npm i express hbs
- To run app just use
npm start