Browse all Node.js lessons.

showing All 155 lessons...

Scraping Data from Sites with Login Forms with Nightmare

P

Add and Remove EventEmitters in Node.js

P

Publish a Module to the NPM Registry

P

Build a Simple HTTP Server with Node.js

P

Scraping Dynamic JavaScript Websites with Nightmare

P

Publish and Share a Node.js Module

P

Web Scraping with Pagination and Advanced Selectors

P

Integrate MongoDB into your Express App

P

Handle Errors with Express Middleware

P

Use Streams in Express

P

Organize Code by Subpath in Express

P

Handle Errors with a Redirect in Express

P

Save and Delete Content in Express with HTTP Verbs

P

Serve static files with express

P

Use Template Engines with Express

P

Define dynamic routes through Express

P

Create a Basic Server with Express

Create a TCP server using the Node.js Net Module

P

Sequelize: Getters, Setters and Virtual Columns

P

Sequelize: Class & Instance Methods

P

Sequelize: Model & Column Casing

P

Web Scraping Images with Node, Xray, and Download

P

Intro to Web Scraping with Node and X-ray

P

Install packages in a Node.js application using npm

P

Sequelize: Validating Models

P

Export Modules in Node.js

P

Create a Simple Node.js Module

P

Sequelize: Querying Basics using findAll

P

Understand Node.js Buffers

P

Installing Node.js and NPM on Windows

Understand Global Namespace in Node.js

P

Understand the Node.js process object

P

Sequelize: Model Definition Basics

P

Understand Callbacks in Node.js

P

Use the Node.js REPL shell

Controlling runaway apps using pm2

P

Passing environment variables to node.js using pm2

P

Restarting your node.js app on code change using pm2

P

Logging with PM2

P

Configuring PM2 for Node applications

P

Using PM2 To Keep Your Node Apps Alive

P

Using npm link to use node modules that are "in progress"

P

Creating Demo APIs with json-server

Using npm run to launch local scripts

P

Introduction to Browserify Part 2

P

Introduction to Browserify Part 1

P

Configuring npm package.json scripts

P

CLI node modules

P

npm install

P

npm init

P
nightmare tutorial about Scraping Data from Sites with Login Forms with Nightmare

Scraping Data from Sites with Login Forms with Nightmare

3:00 nightmare PRO

Many pages you'll want to grab data from will require you to log in first. This video demonstrates how to log in and grab whatever data off the page you will need.

javascript tutorial about Add and Remove EventEmitters in Node.js

Add and Remove EventEmitters in Node.js

6:00 javascript PRO

In this lesson, you will learn what an EventEmitter is and how it works. We start with a simple example creating an instance of the EventEmitter class, then expand on it by building listeners and emitting events to trigger them. You will learn how to view listeners in the global emitter object, as well as how to remove them and understand what the EventEmitter memory leak message means. We wrap everything up by examining the http server class to illustrate how node.js uses EventEmitters in many places for core features.

javascript tutorial about Publish a Module to the NPM Registry

Publish a Module to the NPM Registry

3:22 javascript PRO

This lesson shows you how to:
* create a user account on the npm registry
* publish your module to the registry
* use npm version to bump the version number of your package
* publish updated versions of your module to the registry
* unpublish modules from the registry

javascript tutorial about Build a Simple HTTP Server with Node.js

Build a Simple HTTP Server with Node.js

4:08 javascript PRO

In this lesson, you will learn how to build a simple http server that serves different content based on routes (a.k.a. the url requested by the client) as well as the http method used.

nightmare tutorial about Scraping Dynamic JavaScript Websites with Nightmare

Scraping Dynamic JavaScript Websites with Nightmare

2:43 nightmare PRO

Many websites have more than just simple static content. Dynamic content which is rendered by JavaScript requires browser to be able to scrape data. This video demonstrates how to use Nightmare (which is a wrapper around Electron) to launch a url and scrape dynamic data.

javascript tutorial about Publish and Share a Node.js Module

Publish and Share a Node.js Module

4:30 javascript PRO

Sharing code and extending functionality in node.js is often done with modules. In this lesson, you will learn how to use npm init to scaffold a new module, verify proper installation, and identify the components needed to publish your module to public and private registries.

xray tutorial about Web Scraping with Pagination and Advanced Selectors

Web Scraping with Pagination and Advanced Selectors

3:29 xray PRO

When web scraping, you'll often want to get more than just one page of data. Xray supports pagination by finding the "next" or "more" button on each page and cycling through each new page until it can no longer find that link. This lesson demonstrates how to paginate as well as more advanced selectors for when links are difficult to scrape.

express tutorial about Integrate MongoDB into your Express App

Integrate MongoDB into your Express App

9:09 express PRO

This lesson will walk you through replacing the app's file system reliance with a live MongoDB database. We'll also use a popular ORM library to manage our database operations.

express tutorial about Handle Errors with Express Middleware

Handle Errors with Express Middleware

5:28 express PRO

Middleware is what Express apps are made of. While the term may be unfamiliar, the techniques and concepts aren't. This lesson will round out your understanding of the various types of middleware and how to use them.

express tutorial about Use Streams in Express

Use Streams in Express

6:59 express PRO

Streams are a big part of Node's famous non-blocking I/O, and Express lets you take full advantage of them. This lesson demonstrates how to integrate streams into your server to improve performance and simplify your code.

We will look at .creatReadStream, .createWriteStream, and .pipe to read and write from streams.

express tutorial about Organize Code by Subpath in Express

Organize Code by Subpath in Express

3:59 express PRO

As your application grows, it's easy to end up with a long list of route handlers and helper functions. In this lesson we'll look at strategies for keeping things organized and manageable.

We will move individual subpaths into their own file by using .router to create an instance of the Express router.

express tutorial about Handle Errors with a Redirect in Express

Handle Errors with a Redirect in Express

6:48 express PRO

Take your routing skills to the next level and learn to recover from errors, initiate downloads, and go beyond simple request and response. When we get a route that does not match we don't want the page to just error out. With .redirect we can send the user to an error page and display a helpful message.

We will go on to see how to download a file with .download and track behavior with get.all.

express tutorial about Save and Delete Content in Express with HTTP Verbs

Save and Delete Content in Express with HTTP Verbs

7:04 express PRO

In this lesson you will learn how to support data modification by handling HTTP verbs besides GET. We will look at how to edit, save, and delete content with .put and .delete.

express tutorial about Serve static files with express

Serve static files with express

3:20 express PRO

Sometimes you just need to serve existing files. In this lesson we'll examine how to use functionality built into Express to do just that.

express tutorial about Use Template Engines with Express

Use Template Engines with Express

3:20 express PRO

Template engines allow you to define your UIs in a declarative manner while maintaining a dynamic, data driven presentation layer. This lesson will demonstrate how to use template engines that have built-in support for Express as well as engines without explicit Express support.

express tutorial about Define dynamic routes through Express

Define dynamic routes through Express

4:30 express PRO

Routing is a fundamental aspect of Express. This lesson demonstrates how to define dynamic routes and access route parameters in your code.

express tutorial about Create a Basic Server with Express

Create a Basic Server with Express

4:24 express

In this lesson we will initialize our Express application using npm init.

After loading express through npm we will look at a couple basic functions Express exposes to us such as .get and .send. This will allow basic interaction via the url.

We will also see how using a package like nodemon can allow for rapid iteration when developing an application.

javascript tutorial about Create a TCP server using the Node.js Net Module

Create a TCP server using the Node.js Net Module

3:54 javascript PRO

In this lesson, you'll learn how to include the built-in node.js 'net' module in your application and create a TCP server. You will learn about the different event listeners used, how to specify specific ports and addresses for your server, and identify where each section of your code is used in the server lifecycle.

You would use the TCP module in scenarios where you want to deal with the raw TCP data yourself- for instance, creating your own messaging platform over TCP.

sequelize tutorial about Sequelize: Getters, Setters and Virtual Columns

Sequelize: Getters, Setters and Virtual Columns

4:27 sequelize PRO

Sequelize attribute getters and setters are a convenient way to encapsulate extra logic for model properties. In this video, we'll cover adding getters and setters to enhance and even virtualize a column.

sequelize tutorial about Sequelize: Class & Instance Methods

Sequelize: Class & Instance Methods

2:32 sequelize PRO

Models in the Node.js ORM, Sequelize, can be expanded with both class level and instance level functions. This video will show you how to extend your models to add helpers or business logic, and explain the methods execution scope.

sequelize tutorial about Sequelize: Model & Column Casing

Sequelize: Model & Column Casing

2:38 sequelize PRO

Javascript and database systems tend to be at odds with regard to how tables and columns should be named. Sequlize provides all the tools necessary to satisfy naming conventions in both your Node.js code and in your SQL database.

xray tutorial about Web Scraping Images with Node, Xray, and Download

Web Scraping Images with Node, Xray, and Download

3:07 xray PRO

Node makes scraping images off the web extremely easy using a couple handy packages: Xray and Download. Simple scrape the img tag, grab all the src attributes, filter out images you don't want, then hand them over to Download to grab them.

xray tutorial about Intro to Web Scraping with Node and X-ray

Intro to Web Scraping with Node and X-ray

2:03 xray PRO

Node and Xray have made web scraping a really simple affair. This video introduces you to the process of scraping all of the "a" tags off of a url and saving them to a .json file.

javascript tutorial about Install packages in a Node.js application using npm

Install packages in a Node.js application using npm

8:14 javascript PRO

In this lesson, you will learn how to find packages to add functionality to your application. You will also learn some valuable tips on how to choose a stable, supported package. We also demonstrate how to install packages using npm and the two simple rules to understand when you should install globally with the -g flag or install the package locally. The dependency section of package.json is used to show how to manage dependencies for both production and development packages. Finally, the caret (^), tilde(~), and star (*) wildcards are explained to control which versions your package is compatible with as well as installing package dependencies from git repos.

javascript tutorial about Sequelize: Validating Models

Sequelize: Validating Models

3:24 javascript PRO

The Node.js ORM, Sequelize, has a powerful system for validating both models and individual columns. This video covers a handful of the more than 30 built-in validators, as well as writing custom validators from scratch.

javascript tutorial about Export Modules in Node.js

Export Modules in Node.js

5:50 javascript PRO

In this lesson, you will learn the difference between the exports statement and module.exports. Two examples are demonstrated, each accomplishing the same task but one using export statements and one using module.exports. You will also learn the basic thumb rule to identify which is appropriate for your current needs.

javascript tutorial about Create a Simple Node.js Module

Create a Simple Node.js Module

6:23 javascript PRO

In this lesson, we introduce modules: what they are and how to use them. You'll learn:
how to create a simple module and export the functions to be accessed elsewhere
how to include code from your module in files within your application
the three rules node uses to find the modules you require
the hierarchy node uses to determine which modules take precedence
which file extensions node can automatically detect when requiring modules

javascript tutorial about Sequelize: Querying Basics using findAll

Sequelize: Querying Basics using findAll

1:57 javascript PRO

Sequelize has a powerful query mechanism, this lesson teaches the basics of querying using the findAll function.

javascript tutorial about Understand Node.js Buffers

Understand Node.js Buffers

10:30 javascript PRO

In this lesson, we cover the Node.js Buffer object in detail. Not only will you learn that the buffer object is a reference to a memory space outside of the V8 engine, but you will learn practical methods to access it, modify it, and convert it to standard Javascript objects that can be used by your code. Examples and discussion are provided for using the toString() method, determining the byte length of the buffer, writing to a buffer, how to avoid truncating data, comparing buffers for equality using both compare() and equals(), and copying buffers using slice().

angularjs tutorial about Installing Node.js and NPM on Windows

Installing Node.js and NPM on Windows

1:13 angularjs

Welcome to the Ionic Quickstart for Windows video series! In this inaugural lesson, we install Node.js and Node Package Manager (NPM). We need to install Node and NPM because Ionic is, in fact, a Node package.

javascript tutorial about Understand Global Namespace in Node.js

Understand Global Namespace in Node.js

4:42 javascript PRO

In this lesson, we introduce the node global namespace object and demonstrate how global variables in node may not behave the way you think they do. We also briefly discuss the global 'require' object and how it operates in the global namespace.

javascript tutorial about Understand the Node.js process object

Understand the Node.js process object

6:26 javascript PRO

In this lesson, we introduce the process object, part of the node.js global namespace. The process object is extremely useful for identifying information about the runtime environment of your node app such as the version of node, the arguments passed to the node executable, the current working directory, and the nextTick function. All of these are discussed and illustrated with examples in this lesson.

javascript tutorial about Sequelize: Model Definition Basics

Sequelize: Model Definition Basics

2:37 javascript PRO

Sequelize is an Object Relational Mapper (ORM), which simplifies interacting with relational databases by abstracting away the need to use SQL directly. This lesson introduces defining models with Sequelize in Node.js.

You will need the Postgres database for this lesson! For Mac users, postgressapp makes this easy.

javascript tutorial about Understand Callbacks in Node.js

Understand Callbacks in Node.js

7:03 javascript PRO

In this lesson you will learn what callbacks are, how to use them and why we use them in our Node applications. We start with a simple javascript function and build a second function that uses it as a callback to understand the basic operation of a callback. From there, we create a few more functions that help illustrate how using callbacks can help us keep our code legible and organized as well as allowing us to use generic functions that can bring in extra functionality when needed via the callback.

javascript tutorial about Use the Node.js REPL shell

Use the Node.js REPL shell

4:19 javascript

In this lesson, you will learn how to use the interactive Node.js REPL (Read - Evaluate - Print - Loop) shell. The REPL shell allows you to enter javascript directly into a shell prompt and have the results evaluated by the node.js engine immediately. This is extremely useful for testing, debugging, or experimenting with new features to understand how they work. Topics covered include creating variables, functions, the reserved underscore ( _ ) character, REPL commands as well as saving and loading your session to prevent losing work.

pm2 tutorial about Controlling runaway apps using pm2

Controlling runaway apps using pm2

3:37 pm2 PRO

This video shows how to enable features in your pm2 config file that allow you to prevent runaway apps from bringing your server down. Setting max memory used, number of running processes allowed and maximum restart attempts are all covered.

pm2 tutorial about Passing environment variables to node.js using pm2

Passing environment variables to node.js using pm2

1:27 pm2 PRO

In this video, you will learn how to pass environment variables to your node.js app using the pm2 config file. This is useful for setting options inside your app such as production or development.

pm2 tutorial about Restarting your node.js app on code change using pm2

Restarting your node.js app on code change using pm2

3:04 pm2 PRO

In this video, learn how to automatically restart your node.js app using pm2 when the code for your app changes. You will also learn how to exclude files and directories from restarting your app (such as static assets, css, images, etc.).

javascript tutorial about Logging with PM2

Logging with PM2

3:16 javascript PRO

This lesson shows you how to redirect pm2 logs to a specific folder, such as the Linux standard /var/log folder.

javascript tutorial about Configuring PM2 for Node applications

Configuring PM2 for Node applications

3:22 javascript PRO

In this lesson, you will learn how to configure node apps using pm2 and a json config file.

javascript tutorial about Using PM2 To Keep Your Node Apps Alive

Using PM2 To Keep Your Node Apps Alive

5:24 javascript PRO

Learn how to install, configure and use pm2, the popular node.js process manager to keep your node apps alive whenever things go wrong.

javascript tutorial about Using npm link to use node modules that are "in progress"

Using npm link to use node modules that are "in progress"

3:07 javascript PRO

It is some times convenient, even necessary, to make use of a module that you are working on before it has been published to the node package manager (npm). The npm link command makes this simple.

javascript tutorial about Creating Demo APIs with json-server

Creating Demo APIs with json-server

6:02 javascript

json-server makes it extremely easy to setup robust JSON apis to use for demos and proof of concepts. John walks you through the process of using pre-built json files for a server and how to generate larger datasets using lodash and faker.

javascript tutorial about Using npm run to launch local scripts

Using npm run to launch local scripts

2:11 javascript PRO

npm run allows you to configure scripts inside of your package.json file which can access locally installed node packages. If you're comfortable with this technique, you can also grunt, gulp, or other build tools by customizing your scripts and saving them inside of your package.json file. With this approach, when a developer starts a new project with your package.json, they can simply run npm install then npm run yourscript without having to install any node packages globally.

javascript tutorial about Introduction to Browserify Part 2

Introduction to Browserify Part 2

1:44 javascript PRO

Browserify allows you to leverage 10s of thousands of javascript modules available in the Node Package Manager (npm) in your browser apps.

javascript tutorial about Introduction to Browserify Part 1

Introduction to Browserify Part 1

4:36 javascript PRO

Browserify is a tool that brings node.js style development to the browser.

javascript tutorial about Configuring npm package.json scripts

Configuring npm package.json scripts

3:04 javascript PRO

With a node package manager's (npm) package.json script property, you can preconfigure common tasks like running unit tests with npm $SCRIPT_NAME

javascript tutorial about CLI node modules

CLI node modules

2:07 javascript PRO

Many node modules provide a command line interface. In this lesson, we'll look at how to use them, as well as how to avoid npm install -g for "global" tools.

javascript tutorial about npm install

npm install

2:26 javascript PRO

npm install provides a convenient way to manage your node.js dependencies.

javascript tutorial about npm init

npm init

1:29 javascript PRO

npm init provides an interactive step-by-step interface for creating a package.json

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?