YoVDO

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

Offered By: Dave Gray via YouTube

Tags

Node.Js Courses Routing Courses File Handling Courses

Course Description

Overview

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.

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

Related Courses

Build a Simple Dynamic Site with Node.js Course (How To)
Treehouse
Introducción a la programación en Python I: Aprendiendo a programar con Python
Pontificia Universidad Católica de Chile via Coursera
Excel/VBA for Creative Problem Solving, Part 2
University of Colorado Boulder via Coursera
Python Functions, Files, and Dictionaries
University of Michigan via Coursera
Estructuras de datos en Python
Universidad Austral via Coursera