Now that we have our model, our database connection, our router, and a logger setup, we can start to write the business logic for our application. This will mainly consist of different controller actions, to handle CRUD operations for the contacts in our database.
We will start by creating a ContactController.js file in the controllers folder, as follows:
touch controllers/ContactController.js
Next, we can define the different route actions in our controller.