Hey gang, in this node js tutorial, I’ll talk about how we can set up some basic routing and respond to different requests, including a 404 page to catch any requests that do not correspond to a particular route.

+ Repo –
+ Atom editor –

You can find more front-end development tutorials on CSS, HTML, JavaScript, jQuery, WordPress & more on the channel homepage…


========== JavaScript for Beginners Playlist ==========

============ CSS for Beginners Playlist =============

============== The Net Ninja =====================

For more front-end development tutorials & to black-belt your coding skills, head over to – or

================== Social Links ==================

Twitter – @TheNetNinja –


  1. Hi!
    Thank you so much for these tutorials. They are simply awesome. I am trying to use node from atom's terminal, but for some reason, it keeps on telling me that
    'The program node is currently not installed'
    I can easily access node from Linux's terminal, but I can't get it running from inside atom, the same goes for nvm. Platformio-ide is not recognizing this either

  2. Why and how does the server still produce the output in JSON format even after commenting out the res.writeHead() line.
    Isn't it needed to tell the browser what content type we are using?

  3. Thanks for this series this helped me a lot.
    But only HTML files are running and external CSS files and JS files are not working.How to fix this?

  4. I am not getting off my seat since Video#1 . These Videos have got me Hooked to 'em.
    Plus, I like this accent.
    Great Job, Shaun!!! Keep it up.

  5. Hi, Great Tutorial!!
    Just one question why it is making two request every time you refresh. One request is for the url that you are calling and at the same time it is making request for '/favicon' ? why so?

  6. I was following a series on and this is about 150% better, simple to understand and follow. I can't thank you enough.

  7. If your platformio-ide-terminal packages doesn't work anymore at this point, I just ended up using my computer's cmd and it works almost the same. If you're using cmd from Windows there are some differences that I just Googled and figured out pretty quick!

  8. Do you know how to remove that '/favicon.ico'? It's really weird and kinda annoying since there's no favicon.ico in the directory. And I noticed this is only happening when the request was made from Chrome.


Please enter your comment!
Please enter your name here