Web Dev Roadmap for Beginners (Free!): [ Ссылка ]
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 ➜ [ Ссылка ]
🚀 This lesson is part of a Node.js for Beginners tutorial series playlist:
[ Ссылка ]
🔗 Source Code: [ Ссылка ]
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: [ Ссылка ]
NPM Official site: [ Ссылка ]
✅ Follow Me:
Twitter: [ Ссылка ]
LinkedIn: [ Ссылка ]
Blog: [ Ссылка ]
Reddit: [ Ссылка ]
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
![](https://i.ytimg.com/vi/3ZAKY-CDKog/maxresdefault.jpg)