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 Deeper into Routing with Express The Request Object

no output in terminal or browser console with console.dir(req);

Hi, I am using nodemon which is running fine and restarting every time I save app.js. I'm using res.render('hello') which is serving the 'hello' view perfectly. The problem is, I don't have any output in either the browser console or the terminal where I'm running the following code with nodemon:

app.post('/hello', (req, res) => {
    console.dir(req);
    res.render('hello');
});

Can anyone suggest something I might be missing? Thanks

1 Answer

I think the problem might be in your hello.pug file. Can you check if the form in the hello.pug file is indented correctly I faced the same problem but it turned out that my form was not correctly indented.