In this section we're going to start up our new project and start to play around with the code inside
of it in order to start this project up.
I'm going to change into my GSX folder and then I'm going to run the command NPM start now.
Before I run this command I want you to know that it's extremely common to see error messages when you
run this command or when you try to visit your application in the browser.
And so in this video if anything goes wrong please watch the whole video because at the end of the video
I'm going to walk you through two very common problems in how to solve them.
OK.
So let's run this thing.
Now when I run it you're going to see a little bit of output scroll and then you're going to be automatically
kicked over to your browser where a new tab is going to open and visit local 3000 and then you'll see
the defaults re-act application appear on the screen and it will probably look something like this.
Now as a quick aside here I want to tell you something that you probably are going to want to know.
We now have our re-act application being ran inside of our terminal as long as it's running in the terminal.
We can then visit localhost 3000 knows that is the address we are at.
That is where our application is available at.
If you ever need to stop the re-act application running in your terminal you can open up your terminal
find the tab inside of your terminal that's running the rack process and then press control see.
Let's try that out right now so I can go back over to my terminal.
I'll see where my re-act application is running and then I'll hit control-C to stop it.
And I should get kicked back over to my command prompt like so once I stop my application.
If I ever need to start it up in the future again I'll run NPM start in my project directory.
I can't just run NPM start anywhere.
I have to make sure I'm inside of my project directory and still go back to my terminal inside my project
directory.
Run NPM starts and once again my app will start up and I'll get directed to localhost 3000.
OK so that looks pretty good.
Now really quickly like I mentioned there might be two possible errors that you're going to run into.
So first off you might see a message that says something like.
Port is in use when you try to run NPM starts.
If you want to see what that looks like you could open up a second tab inside of your terminal make
sure you're still inside of your project directory and then run NPM start.
So we're now essentially trying to start up two copies of our re-act application.
The second copy is going to show me a message like this right here.
And so it's telling me hey there's something already running on port three thousand.
If you see this message you can either stop the other server or you can say yeah go ahead and run my
re-act application on another port.
So I'd put in yes.
And then it will start up on port three thousand one instead.
So if you already have something running on port three thousand on your computer.
Just be aware that you might have to use a slightly different port.
Now the second problem that you might run into will be local those 3000 not working.
So you might get this new tab open up like so you know we'll try to go to a local host 3000 but it won't
actually show anything on the screen if that's the case then a very easy workaround is to go back over
to your terminal.
Why this message right here where it says on your network and then you can visit that address instead
of the local host 3000.
So I will copy that other address right there and I can visit it inside of my browser just as well and
still see my react application.
OK so that's how we start up our app.
That's how we stop it.
And that's how we restart it again in the future.
Remember these commands right here because we are going to be starting and stopping different re-act
apps throughout this course very very frugally.
All right let's take another pause right here and continue in the next video.