Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSeb Gates
11,605 PointsHi, I am trying to see the output in a browser. Guil is using localhost:8000. I have tried this and nothing renders.
I also try to view the output by viewing the file path file:///Users/sebgates/react/index.html - Still nothing. When I used http server in another course, I ran the project on localhost:3000. We did not set up http server in this course. I also tried tutorials here: https://reactjs.org/docs/getting-started.html and they worked by viewing the file path in a browser - so I can render React components using tutorials on https://reactjs.org using a CDN. Am I missing something obvious?
5 Answers
Jaime Serradell
3,350 PointsMac: in the terminal you have to place into the scoreboard folder and then write "python -m SimpleHTTPServer". After this, you can access by localhost:8000 on google chrome. Hope I helped you
Eyanjem Etta-Ashu
Full Stack JavaScript Techdegree Graduate 18,260 PointsYou can install an npm http server to view on a browser. run the install while on the path of your project file and you should be good to go. see link below on how to download the http server. This server will listen on port 8080. https://www.npmjs.com/package/http-server
L Haney
Front End Web Development Techdegree Student 10,263 PointsCan you post some code examples on how you did it? A lot of us are struggling with this.
Jelena Feliciano
Full Stack JavaScript Techdegree Student 12,729 Pointsthis worked for me after installing npm install --global http-server
in the terminal I was able to use npx http-server
I didn't add a path because I was already accessing the file path in the terminal. I was brought to index of page that included a link with the name of my file and when clicked I was able to see the app in the browser.
Also was able to see the app in the browser by copying the index path in the browser but wanted to try out the http-server. Hope this helps
ramo rimo
50 Pointsit doesn't working with me nothing shown I'm using windows 10
Tai Huynh
7,093 Points(MAC user with test server using python3) Use http://0.0.0.0:8000/ install of localhost.8000.
volhaka
9,875 Pointson Mac I installed live-server ( i have npm installed )
npm install -g live-server
I start live server pointed to project folder
live-server scoreboard
and I checked that I had an error in console with something with my JS code, and after I fixed it the site had rendered.