From the course: Building RESTful APIs with Node.js and Express

Unlock the full course today

Join today to access over 24,500 courses taught by industry experts.

Initial server files and folders

Initial server files and folders

- 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, like controllers, models, and routes. So let's get to it. So what I'm going to do is go inside of our route directory and create a source folder, SRC, like that. And then inside of that source folder I'm going to create another folder which will be called controllers. And I'll explain each and every one of 'em as we go into them. And then I'm going to create a folder for the models. So let's go and click another folder and I'm going to call this the models. And then finally, I'm going to, again, make sure that it's in the source folder. Create another folder which will be routes. The controllers are the functions that will allow us to get information into the endpoints and forward it to whoever is…

Contents