What am i doing wrong please explain

Tell us what’s happening:

it isnt working

Your code so far

https://misty-stingy-brick.glitch.me
Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:78.0) Gecko/20100101 Firefox/78.0.

Challenge: Serve an HTML File

Link to the challenge:

Hey there @zakplayer23 :wave:,

The challenge asks you to use the relative path to the HTML file, and you’re getting there, you just forget that the __dirname will give you the filename without any /(slash) ending. So __dirname + "views/index.html" will essentially give you directoryviews/index.html instead of what you want which is directory/views/index.html. All you need is a /(slash) at the start of "views/index.html"

Hope this helps :slight_smile:

ill try it thanks hope it works!

it didnt work :frowning: can you explain a bit more

Ok, so the next problem is that, express reads the code from top to bottom, and you have 2 routers that serves at the same level "/". This means it will run the first one, and possibly ignore the second one. The challenge actually gives you a note to do this too. All you have to do is comment out the first router. and you should be good :slight_smile: