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 trialMark Pixel
Courses Plus Student 2,337 PointsQuick tips for anyone starting React Basics (https://teamtreehouse.com/library/react-basics)
This comment is for the course React Basics: https://teamtreehouse.com/library/react-basics
For anyone who wants to complete this course locally, you can just drop the entire ReactBasicsProject folder into the folder that holds static files for a NodeJS or Express app. If you completed the course Express Basics (https://teamtreehouse.com/library/express-basics) you would've had to set up a NodeJS server, anyway.
ALSO, for anyone who can't seem to get the app to run for the first time, you might have typed ReactDom.render instead of ReactDOM.render. That's what I did.
1 Answer
Mark Pixel
Courses Plus Student 2,337 PointsThe Express Basics course was very good, but there is one bug in it. First of all, it uses the Jade templating engine, but Jade has been replaced with Pug. Second, the code to set up the Jade templating engine didn't work. You can still use Jade, for some reason, but just make sure to replace Hudson's code with the following code.
var path = require('path');
app.set('view engine', 'jade');
app.set('views', path.join(__dirname, 'templates'));
app.get('/', function(req, res){
var path = req.path;
res.locals.path = path;
res.render("index.jade", {layout: 'layout'});
});
This drove me crazy because the templates did not work. But I'd start off with Andrew Chalkley's course on NodeJS, first. The Express Basics course builds on top of it.
john larson
16,594 PointsIt's pretty awesome that you were able to work around some of the bugs. There have been a few courses that I just dropped cause things just didn't happen the way they were presented. So, kudos on you :D
Iain Simmons
Treehouse Moderator 32,305 PointsThat's helpful information, but I wouldn't call an outdated course using old code a 'bug'. :)
I don't envy the teachers trying to keep up with all the changes in the JS world!
john larson
16,594 Pointsjohn larson
16,594 PointsThanks for sharing. So you did the node.js course? If so, what did you think?