Do It Yourself – Tutorials – How to Build a Web Server with Node JS | Node.js Tutorials for Beginners

by | Sep 3, 2021 | 0 comments

Do It Yourself – Tutorials – How to Build a Web Server with Node JS | Node.js Tutorials for Beginners

by | Sep 3, 2021 | Do It Yourself - Build Your Own Website | 0 comments

Do It Yourself – Website Tutorials



Learn how to build a web server with Node JS. This Node.js tutorial for Beginners will walk you through building a web server with only Node JS – no framework required. This will help you build foundational knowledge of Node.js which will help when the Express JS framework is introduced later in this Node JS tutorial series.

🚩 Subscribe ➜ https://bit.ly/3nGHmNn

🚀 This lesson is part of a Node.js for Beginners tutorial series playlist:

🔗 Source Code: https://github.com/gitdagray/nodejs_web_server

How to Build a Web Server with Node JS | Node.js Tutorials for Beginners

(00:00) Intro
(00:05) Welcome
(00:14) Overview
(00:28) Project Setup
(03:01) Import modules / dependencies
(04:33) A minimal server
(08:02) Two inefficient approaches
(11:06) Setting the Content-Type
(13:11) Setting the file path
(15:59) Make the html extension optional
(17:22) Does the requested file exist?
(18:18) Routing redirects
(22:48) Basic serveFile function
(25:17) Calling the serveFile function
(28:20) Serving JSON with the serveFile function
(30:25) Serving images with the serveFile function
(31:59) Sending a 404 status code
(32:56) Logging requests and errors
(35:51) Up and running with the web server

📚 References:
Node.js Official site: https://nodejs.org
NPM Official site: https://www.npmjs.com/

✅ Follow Me:
Twitter: https://twitter.com/yesdavidgray
LinkedIn: https://www.linkedin.com/in/davidagray/
Blog: https://yesdavidgray.com
Reddit: https://www.reddit.com/user/DaveOnEleven

Was this tutorial about how to build a web server with Node.js helpful? If so, please share. Let me know your thoughts in the comments.

#node #nodejs #server

source

0 Comments

Submit a Comment

What Our Clients Are Saying

FS Designs

Leland is extremely knowledgeable and super pleasant to deal with. He helped me get my website running for my graphic...

F.S.

Dieno Digital Marketing Services
5
2018-06-19T18:50:18+00:00

F.S.

Leland is extremely knowledgeable and super pleasant to deal with. He helped me get my website running for my graphic design business and improved my SEO so that I appear more frequently and near the top of searches. He a great digital and web strategist and I would highly recommend his services.

Juju Hair Lounge

Great class! Not only was it very informative but it was also really entertaining! I can't wait to apply everything...

Leah

Dieno Digital Marketing Services
5
2018-07-09T03:06:21+00:00

Leah

Great class! Not only was it very informative but it was also really entertaining! I can't wait to apply everything I've learned to our Facebook business page!

Uniglobe Travel – Western Canada

I enjoyed the workshop, we covered a broad range of topics in a short space of time, but I appreciated...

Ciara

Dieno Digital Marketing Services
5
2018-07-10T03:22:20+00:00

Ciara

I enjoyed the workshop, we covered a broad range of topics in a short space of time, but I appreciated that there was some concrete, actionable advice given as well!

North Burnaby Boxing Club

Thanks so much for all the great work you have done in developing our website Leland!

Manny, North Burnaby Boxing Club

Dieno Digital Marketing Services
5
2018-04-27T01:06:02+00:00

Manny, North Burnaby Boxing Club

Thanks so much for all the great work you have done in developing our website Leland!
5
4
Dieno Digital Marketing Services
[newsletter_form]
<div class="tnp tnp-subscription"> <form method="post" action="https://www.dienodigital.com/?na=s"> <input type="hidden" name="nlang" value=""><div class="tnp-field tnp-field-firstname"><label for="tnp-name">First name or full name</label> <input class="tnp-name" type="text" name="nn" value=""></div> <div class="tnp-field tnp-field-email"><label for="tnp-email">Email</label> <input class="tnp-email" type="email" name="ne" value="" required></div> <div class="tnp-field tnp-field-button"><input class="tnp-submit" type="submit" value="Subscribe" > </div> </form> </div>