From the course: Building RESTful APIs with Node.js and Express
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Initial server setup
From the course: Building RESTful APIs with Node.js and Express
Initial server setup
- [Instructor] Now the fund begins, we'll start by creating our initial server code and making it running properly. We'll simply work on the basis of our server which will add more and more as we build our backend APIs. All right, so let's get started. So, the first thing we're going to need to do is change the script, in this area here. So, we have nodemon, we need to use nodemon so we can do NPM start and it's going to start our server, automatically and we start it whenever we change our code. So, this is what we're going to do. We're going to change test to start and then here, what we're going to do is do nodemon and we're going to call index.js. And you can just simply do index without doing this but I'm used to do it this way. Then exact babel-node, and that's all you need. So, once we start a server, this is going to start it and we're going to be good to go. Now, we need to create the index.js files cuz right…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.