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 Express’s Response.render Method

Cant get '/card' to run in browser

my index.pug file is working when I get on the landing page in browser, but when I try to navigate to the /card page it says cannot GET. please help

const express = require('express');

const app = express();

app.set('view engine', 'pug');

app.get('/', (req, res) => { res.render('index'); });

app.get('/cards', (req, res) => { res.locals.prompt = "Who is buried in Tut's Tomb?", hint: "Think about who's tomb it is" res.render('card'); });

app.listen(3030, () => { console.log('The application is running on localhost:3030!') });

heres my /card file

doctype html html(lang="en") head title Flash Cards body header h1 Flash Cards section#content h2= prompt p i Hint #{hint} footer p This will be the start of some real coding!