I am trying to create a basic application that I able to serve as a movie database. Im following a tutorial on YouTube (link) (I have reached 5:22 in the video)
Im stuck banging my head against the wall because I cannot get the app to run in a chrome browser. At the current stage all I should see is a blank white screen.
Instead when I run it I see chrome saying that "this site can't be reached" and "local host refused to connect"
I have tried EVERY possible solution I could find on the internet. These are a notable few:
I am running MacOS and the latest version of react and visual studio code. I've attached a few images for your reference.
Make sure your app is running as told in comment. If you have not defined "start" in your package.json file, then try to run
node app.js and verify again localhost:3000.
Solution to the compile errors: So I figured out the main problem. I had deleted the files index.css and reportWebVitals from my react app. I did this because the YouTube tutorial had done this as well, I assume it was to make it a bit cleaner. Upon creating a new react app I was able to follow each step of the process but this time I made sure keep the index.css and reportWebVitals files and it worked. Not sure why the app ran in the YouTube tutorial and not for me.
Solution to the localhost not connecting: I followed the suggestions of running it using nom start which got the local host to connect. I was earlier doing it through visual studio code's "start debugging" option.