From the course: MERN Essential Training (2020)

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Initial server setup

Initial server setup

From the course: MERN Essential Training (2020)

Start my 1-month free trial

Initial server setup

- [Instructor] Now the fun begins. We'll start by creating our initial server code, and making sure it is running properly. We'll simply work on the basis of our server, which we'll add more and more as we build our backend. So the first thing we need to do is to make sure we have a start command, so in our package.json file, we need to change the script here. So what we're going to do is change the test to start. And then in the actual command we're going to change this to actually run an executing Babel, so we can transpile the code. So let's go ahead and use nodemon first and then we're going to run the index.js file, which we'll create momentarily and execute with Babel node. So we can transpile the code with these options. So e and js. So basically using the js files and then transpiling with Babel. All right, so we can save this file, and then let's create our main index.js file that our server is going to be…

Contents