Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

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

Dave Gray via YouTube

Overview

Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This beginner tutorial builds a web server with Node.js without using a framework. It covers project setup, routing, content types, file and data serving, redirects, error responses, and request logging.

Syllabus

Intro
Welcome
Overview
Project Setup
Import modules / dependencies
A minimal server
Two inefficient approaches
Setting the Content-Type
Setting the file path
Make the html extension optional
Does the requested file exist?
Routing redirects
Basic serveFile function
Calling the serveFile function
Serving JSON with the serveFile function
Serving images with the serveFile function
Sending a 404 status code
Logging requests and errors
Up and running with the web server

Taught by

Dave Gray

Reviews

Start your review of How to Build a Web Server with Node JS - Node.js Tutorials for Beginners

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.