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 trial

Joseph Spirito
11,007 PointsMy server isn't loading my JavaScript =[
Following the guide on the last video to set up a python server, it runs on localhost:8000 as expected: however, my app.js is empty in my dev tools! I can't even get my console.log(title); command to work.
I've tried reloading the page. I've manually put in an h1 tag to test if index.html is running and it works. My app.js is seems to be lost.

Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsWhat do you see in the console after running the local server? FYI an alternative might be to use this http-server npm package.

Joseph Spirito
11,007 PointsThe alternative you suggested works! The only problem is I have to quit the server every time the file changes. Correct me if I'm wrong, but could I use Gulp's Browser-Sync for this?

Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsThis problem will solve itself when you get to the later stages of the react course, you'll get the live reloading feature from webpack when you run npm start
(not now, later).

Joseph Spirito
11,007 PointsI'm currently using Browser-Sync to get through this. I do want to point out that I do appreciate your time. If it wasn't for you stating an alternative, I would have never connected the dots to use a gulp plug-in.
Thank you!

Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsCool, np
1 Answer

Joseph Spirito
11,007 PointsI am on the 'Learning React' track video #3
On video #2 we download the source files and are directed to set up a 'simple http server' and the teachers notes have us download Python. My version is 2.7. My terminal command is python -m SimpleHTTPServer
It just doesn't want to see this code:
const title = React.createElement( 'h1', { id: 'main-title', title: 'This is a title' }, 'My First React Element!' );
console.log(title);
or any code in app.js
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsBrendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsWhich video are you referring to? Do you have your code in a Treehouse workspace or on Github?