Express local library link problems

Hi @chrisdavidmills , I’m learning express with the local library tutorial on mdn. Everything seems to be working fine except for my author detail page. The forward slash is not automatically inserted when I click the link from the author list page.

However, if I should insert the forward slash manually the link works perfectly. Pls your suggestions is highly and urgently needed. Below is a screenshot of the error page. Thank you

1 Like

Hello!

This sounds like a fairly simple problem, maybe a typo in your router code? Maybe around this kind of area?

If this doesn’t help, let me know which tutorial you got to when you first started to get a problem — what worked for you, and when did it stop working? The more information I have like this, the more easily I can try to pinpoint the problem.

Thanks, for giving your solution.

I had this same exact problem. When I clicked on an author, I got this 404 page. Thanks to the OP I learned that my URL was missing the forward slash.

image

I traced the problem to the virtual for author’s URL in/models/author.js

image

Once I added the forward slash it worked as intended.

P.S. I also checked the tutorial, and it was fine. I must have missed the slash when typing it myself.