DEV Community

Discussion on: Node.js server fails to render pages

Collapse
 
sfiquet profile image
Sylvie Fiquet

Two things:

  • looks like it's not stepping inside the if (sendToErrorPage) block so sendToErrorPage is not set to true.
  • shouldn't the second createReadStream be wrapped in an else? It's only supposed to be called when the path is correct, right?
Thread Thread
 
dwmedina profile image
Daniel Medina

Wrapping the second createReadStream inside an else got everything working.

For good measure, I added the favicon tags in both HTML <head> tags.

Thank you so much for your help!! 🎉🎉