Introduction to Node.js, v3

Scott Moss

Scott Moss

Superfilter AI
4 hours, 12 minutes CC
Introduction to Node.js, v3

Course Description

Take your JavaScript skills to the server with Node.js! Learn to build command-line interfaces, read and write from files and databases, and create scalable servers. Use third-party modules, asynchronous coding, and CRUD operations. Test your code with Jest. Gain all the skills you need to develop professional Node.js applications!

This course and others like it are available as part of our Frontend Masters video subscription.

Preview
Close

What They're Saying

I just completed "Introduction to Node.js, v3" by Scott Moss on Frontend Masters! The big thing covered in this class is using ES6 modules and syntax in node.js. Scott covers how you can write a CLI app in node with ES6.
Tamara Temple

Tamara Temple

tamouse

I just completed "Introduction to Node.js, v3" by Scott Moss on Frontend Masters! Lots of fun and opened my eyes to all the things I can build knowing this.
noah

noah

noahh_ts

Course Details

Published: August 13, 2023

Learn Straight from the Experts Who Shape the Modern Web

Your Path to Senior Developer and Beyond
  • 200+ In-depth courses
  • 18 Learning Paths
  • Industry Leading Experts
  • Live Interactive Workshops

Table of Contents

Introduction

Section Duration: 4 minutes
  • Introduction
    Scott Moss introduces the course by providing some personal and professional background. An overview of the material that will be covered and course resources are also provided in this segment.

Node Basics

Section Duration: 27 minutes
  • History of Node.js
    Scott summarizes Node.js as a JavaScript runtime used outside of web browsers. Created by Ryan Dahl in 2009, it overcame web browser limitations and server-side scripting inefficiencies.
  • Non-Blocking I/O
    Scott explains the non-blocking I/O model employed by Node.js to handle concurrent connections in high-performance network applications. Key features, such as event loops, callbacks, non-blocking APIs, and its single-threaded nature, contribute to its efficiency.
  • Hello World
    Scott walks through the setup of Node.js and a version manager called nvm. The segment includes creating a simple Node.js program that prints to the terminal.
  • Browser vs Node.js
    Scott explains the distinctions between how JavaScript is handled in the browser and Node.js, offering an overview of the Node.js REPL. The segment covers differences in the global object, modules, DOM, and console.

Creating a CLI

Section Duration: 26 minutes

Modules

Section Duration: 45 minutes

File I/O

Section Duration: 1 hour, 20 minutes
  • Async Code
    Scott explains the benefits of asynchronous code, which allows other operations to occur while waiting for a task to complete. A demonstration of how to avoid nested callbacks using promises is also covered in this segment.
  • FS Module
    Scott demonstrates how to use the built-in FS module, which provides an API for interacting with the file system. Student questions regarding debugging errors involving nesting callbacks are also covered in this segment.
  • Using a File as a DB
    Scott demonstrates how to use the FS module and a JSON file as a database to store created notes. The foundation for utility functions to read the db.json file, save a JavaScript object, and add a new note are also covered in this segment.
  • CRUD Methods: Create
    Scott explains CRUD operations, which involve create, read, update, and delete actions on the notes in the database. Abstracting the previously created insert utility function for creating new notes and a student's question about destructuring are also covered in this segment.
  • CRUD Methods: Read & Delete
    Scott develops a function to fetch all notes from the database and filters them based on the provided filter string. A demonstration of the process of removing notes with specific IDs and clearing all notes from the database in this segment is also provided in this segment.
  • Using the CRUD Methods
    Scott updates the commands to utilize the previously created CRUD methods, allowing for better functionality and interaction with the notes in the database.

Testing

Section Duration: 33 minutes

Servers

Section Duration: 28 minutes

Wrapping Up

Section Duration: 6 minutes

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now