Skip to main content

Creating a controller in Node

Greetings!

In this 3rd part of the tutorial, we are going to connect our employee schema with the controller.

(this is incomplete without views on next tutorial)

We are going to use mongoose's built in methods to access database and do our operations.

Update employee controller as follow.