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 trialMichael Brown
17,651 PointsI changed the parameter names to req and res respectively. But it says they are not defined. Anyone else?
It tells me response is not defined, but request seems to be fine..
'use strict';
var express = require('express');
var app = express();
app.get('/', function(req, res){
response.send("I Love Treehouse!");
});
app.listen(3000);
2 Answers
Steven Parker
231,269 PointsIt actually says response is not defined. You're supposed to replace it with "res", remember?
Change the names on both lines 7 and 8.
Michael Brown
17,651 PointsYeah, I figured it out about five minutes after I posted the question. Sorry for the trouble!
Christian A. Castro
30,501 PointsChristian A. Castro
30,501 PointsHello Michael! Just wanted this question answered.. All you have to do is replace "response" with your second parameter which is "res"
res.send("I Love Treehouse!");