This project is a base example for MVC pattern with Express and Handlebars. For dependencies installation you can use:
npm install
For run the project in production, you can use:
npm start
For development environment, you can use:
npm run dev
For linting you can use:
npm run lint
npm run lint:fix
This projects follow the MVC pattern, you can see four main folders at src:
controllers: Controllers are the main logic of the application. This controllers will be called by the routes.
models: Models are the main data access of the application. This models will be called by the controllers. This folder contains entities, DAOs or repositories.
views: This views will be called by the controllers. This folder contains the handlebars templates for server side rendering HTML.
public: This folder contains the static files for the application.
We have three files on the src folder:
routes.js: This file is the main routes file. It will be used to configure the routes and his controllers.
index.js: This file is the entry point of the application. It will be mount the server.
app.js: This file is the main application file. It will be used to configure the express application.
This project uses standard linter rules. You can see the rules on eslint-config-standard.