No such file or directory '/app/views/link.html'

// https://expressjs.com/en/starter/basic-routing.html
app.get("/links", (request, response) => {
  response.sendFile(__dirname + "/views/link.html");
});

When i enter mywebsiteurl.glitch.me/links, i get this error:
no such file or directory '/app/views/link.html'

Ok, nevermind. Turns out i just mispelled the filename.

1 Like