Node.js, Express not routing parameterized GET request

You should add the / at the beginning of your path. So, it should be as follow:

app.get('/api/courses/:id', (req, res) => {
    var courseCode =;
    console.log(`Received GET request for ${req.url}`);
    //more code after this..

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top