From the course: MERN Essential Training
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Server files and folders
From the course: MERN Essential Training
Server files and folders
- [Instructor] So before we start adding endpoints to our server, let's set up our folder structure for a project. I personally put everything in a source folder and then start branching out the folders and files I'll use for the server, my controllers, models and routes, so let's get to it. Inside the backend folder, I'm going to start adding a whole bunch of folders here. So we're going to start by adding controllers. We're also going to add models. And we're also going to add routes. And inside of each of these folders, we're going to add one file. So in the controllers, we're going to add a playerControllers.js file. Inside the models we're going to add a playerModel.js. And then in the routes, we're going to add soccerRoutes.js. So this is fairly straightforward, and we'll start adding items to this file as we add our routes, models, and controllers. So let's move on.