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

JavaScript Express Basics (2015) Getting Started with Express Setting Up an Express Server

I 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..

app.js
'use strict';

var express = require('express');

var app = express();

app.get('/', function(req, res){
  response.send("I Love Treehouse!");
});

app.listen(3000);
Christian A. Castro
Christian A. Castro
30,501 Points

Hello 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!");

2 Answers

Steven Parker
Steven Parker
231,269 Points

It actually says response is not defined. You're supposed to replace it with "res", remember?

:point_right: Change the names on both lines 7 and 8.

Yeah, I figured it out about five minutes after I posted the question. Sorry for the trouble!