Главная
Study mode:
on
1
Intro
2
Welcome
3
Overview
4
Project Setup
5
Import modules / dependencies
6
A minimal server
7
Two inefficient approaches
8
Setting the Content-Type
9
Setting the file path
10
Make the html extension optional
11
Does the requested file exist?
12
Routing redirects
13
Basic serveFile function
14
Calling the serveFile function
15
Serving JSON with the serveFile function
16
Serving images with the serveFile function
17
Sending a 404 status code
18
Logging requests and errors
19
Up and running with the web server
Description:
Build a web server using Node.js without relying on frameworks in this comprehensive 39-minute tutorial for beginners. Learn foundational Node.js concepts by creating a server from scratch, covering topics such as importing modules, setting up a minimal server, handling content types, implementing routing and redirects, serving various file types including HTML, JSON, and images, and managing 404 errors. Gain practical experience in file path management, creating efficient server functions, and logging requests and errors. By the end of this hands-on guide, develop a solid understanding of Node.js server construction, preparing you for more advanced concepts like working with the Express.js framework in future lessons.

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

Dave Gray
Add to list
0:00 / 0:00