-
Book Overview & Buying
-
Table Of Contents
Mastering Web Application Development with Express
By :
Next, we start by bootstrapping the application. We then create a validation library so we can reuse it in our models. Once this is done, we create the routes and integrate them into the current application.
For each part that requires writing code, we first create tests, run them to see them fail, and only then continue with the actual implementation. This has multiple benefits, one of the most important being that we will have a better understanding of what we are going to create.
Let's take a look at how the structure of our application will look after we have finished it:

In the root folder of the application, we create the following folders:
lib: This folder is used for custom functionality
models: This folder contains Mongoose models for users and notes
routes: Instead of putting all the routes in the server.js file, we put them in this folder and require them in the main file
test: This folder contains all the tests for the...
Change the font size
Change margin width
Change background colour