From the course: AWS and React: Creating Full-Stack Apps (2019)

Using npm to create a React app - Amazon Web Services (AWS) Tutorial

From the course: AWS and React: Creating Full-Stack Apps (2019)

Start my 1-month free trial

Using npm to create a React app

- [Instructor] Now that we have npm installed, we're going to start off by creating our first app. That's right, right off the bat, we're going to create an app, and we're going to run it. So I'm going to go to the terminal, and in the terminal, I'm on my desktop, and this is where I'm going to create my project, so I'm going to run npx create-react-app, it's almost natural language, and I'm going to name the project todo. I recommend you use this project because a lot of the things are going to be based on it and if you do something different, some things may not line up. So at least for this quick and easy one, I recommend you follow these instructions pretty specifically, as opposed to doing something that you want to do with a variation like nodes, or a schedule, or some other type of project. This will allow us to map things one-to-one as we go through this, and avoid any confusion. So all I have to do is run that, and npx is going to download everything it needs and delete it when it's done. Again, that way, we never have to worry about versions or anything. Now once this project is created for us, it'll also be a full demo-type project, so we don't have to do anything else to run it. We'll just change directories and run the app. It'll load up in the browser automatically with the right URL, and even have a little logo for a setup. Now that it's done everything, we can change directories to our todo directory that it created, and run the app with npm start. It starts the browser for us, loads the app, and everything's running okay. It even gives us a little bit of help as to what we need to edit to move forward. But we have our basic app, it's running, everything looks good, congratulations, you've created your first React app, or you've created another one.

Contents