I am not getting the output id is simply loading in the server

Viewed 27

i am trying to use the the express routing function but not getting the output when i go to the server it just keeps on loading

app.get("/posts/:postname", (req, res) => {
  let requrl = req.params.postname;
  posts.forEach(function (post) {
    let storedtitle = post.title
    if (storedtitle === requrl) {
      app.render("post", {
        title: post.title,
        content: post.content
      })
    }
  });
})
0 Answers
Related