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 Using Templates with Express Using Logic in Pug

amro
amro
5,773 Points

Using Logic in Pug

Using Logic in Pug

i keep getting Cannot GET /cards help please

2 Answers

Mark Westerweel
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Mark Westerweel
Full Stack JavaScript Techdegree Graduate 22,378 Points

I think you need to specify 'card', not 'cards'.

Happened to me as well.

app.get('/card', (req, res) => {
    // can store variable here as res.locals
    //e.g. res.locals.prommpt = 'string'
    res.render(`card`, { prompt: `Who's buried in grant's tomb?`, hint: `Think about who's tomb it is...` } );
})
Harald N
Harald N
15,843 Points

Hi amrhassabo2, to help us help you :) Please link to your code or copy your code here using the Markdown cheatsheet.