To start developing the backend part of the MERN skeleton, we will first set up the project folder, install and configure the necessary npm modules, and then prepare the run scripts to aid development and run the code. Then, we will go through the code step by step to implement the user model, API endpoints, and JWT-based auth to meet the specifications we defined earlier for the user-oriented features.
The code discussed in this chapter, and for the complete skeleton application is available on GitHub in the repository at github.com/shamahoque/mern-skeleton. The code for just the backend is available at the same repository in the branch named mern-skeleton-backend. You can clone this code and run the application as you go through the code explanations in the rest of this chapter.