I want to access the route parameters in Node.JS and I am using the following syntax:
app.get("posts/:postName", function(req,res){
console.log(req.params.postName)
});
Is something wrong in the syntax? The error I get in the browser is, "Cannot GET /posts/print". Over here, print was the key-word I chose.
Your code is missing
/