Working with Node.js

Paths

Working with Node.js

Authors: Samer Buna, Joe Eames, Brian Clark, Jonathan Mills, Armen Avanesi, Justin Boyer, Nate Taylor, Brice Wilson, Auggie Hudak

Node.js is an open-source, cross-platform JavaScript runtime environment that executes JavaScript code outside of a browser. Node.js enables developers to use JavaScript to write... Read more

What You Will Learn

In this path you will learn how to work with NPM packages, mongoDB, and navigate through files and directories while learning about the Node.js framework. You will also learn how to write and test asynchronous patterns in Node.js and begin to understand how Node.js handles cryptography.

Pre-requisites

HTML

Working with Node.js

Node.js is an open-source, cross-platform JavaScript runtime environment that executes JavaScript code outside of a browser. Node.js enables developers to use JavaScript to write command line tools and to utilize server-side scripting to create dynamic web page content before the page is sent to the user's web browser. This path will take you from the basics of Node.js to writing and testing asynchronous Node.js code.

Node.js: Getting Started

by Samer Buna

Sep 11, 2018 / 3h 28m

3h 28m

Start Course
Description

Web and Mobile applications depend on back-end services to host their various resources and do most of the heavy lifting. Creating these back-end services is often very difficult, but the Node.js runtime makes it easier and more fun. In this course, Node.js: Getting Started, you'll learn the basic skills you need to create scalable back-end services with Node.js. First, you'll learn about the tools that come built-in with Node as well as some of the tools that are offered by the community. Next, you'll learn about package management, module dependencies, event-driven concurrency strategies, and how to write code to interface with the operating systems on servers. Finally, you'll discover the modern JavaScript features that you can use with Node.js today. When you're finished with this course, you'll be comfortable creating and executing code for Node.

Table of contents
  1. Course Overview
  2. Introduction
  3. Getting Started with Node
  4. Modern JavaScript
  5. NPM: Node Package Manager
  6. Modules and Concurrency
  7. Working with Web Servers
  8. Working with the Operating System

Getting Started with npm

by Joe Eames

Apr 16, 2020 / 58m

58m

Start Course
Description

Learning npm is important because it is one of the most widely used developer tools. In this course, Getting Started with npm, you’ll learn to use npm with your development. First, you’ll explore the basic tasks in npm that will be used on a frequent basis such as creating a project and installing dependencies. Next, you’ll discover advanced scenarios for npm such as installing from alternate locations, pruning, and auditing. Finally, you’ll see how to publish your own packages to npm. When you’re finished with this course, you’ll have the skills and knowledge of npm needed to handle both common scenarios and advanced tasks & skills.

Table of contents
  1. Course Overview
  2. npm Basics
  3. Advanced npm
  4. Publishing Your Own Package

Automating Node.js with NPM Scripts

by Brian Clark

Dec 23, 2019 / 2h 32m

2h 32m

Start Course
Description

Finding ways to speed up your development workflow can greatly improve your efficiency in completing work. In this course, Automating Node.js with NPM Scripts, you will gain the ability to quickly and efficiently build Node.js applications with NPM. First, you will learn how to get started with creating scripts. Next, you will discover ways to automate commons tasks that are part of a developer inner loop using NPM. Finally, you will explore how to leverage these scripts within Visual Studio Code. When you are finished with this course, you will have the skills and knowledge of NPM needed to develop Node.js apps efficiently.

Table of contents
  1. Course Overview
  2. Getting Started Creating NPM Scripts
  3. Scripting for Building
  4. Scripting for Developing
  5. Scripting for Testing
  6. Scripting for Deploying
  7. VS Code

Using MongoDB with Node.js

by Jonathan Mills

Dec 23, 2019 / 1h 18m

1h 18m

Start Course
Description

Leveraging document data from a MongoDB database has become a defacto standard for Node.js applications. In this course, Using MongoDB in Node.js, you will gain the ability to build MongoDB into your Node.js application. First, you will discover how to create and interact with a MongoDB database. Next, you will learn how to implement Create, Read, Update, and Delete (CRUD) using a repository object. Finally, you will explore how to aggregate data using the aggregation pipeline built into MongoDB. When you are finished with this course, you will have the skills and knowledge of MongoDB needed to leverage its power in your Node.js application.

Table of contents
  1. Course Overview
  2. Getting MongoDB Running
  3. Working with CRUD
  4. Working with the Aggregation Pipeline

HTTP with Node.js

by Armen Avanesi

Mar 13, 2020 / 57m

57m

Start Course
Description

Node.js is a perfect fit for a wide variety of applications. The HTTP module acts as a backbone for these applications by providing the functionality needed to create servers and interface with the web. In this course, HTTP with Node.js, you will gain the knowledge you need to implement Node’s powerful, built-in HTTP module in any application. First, you will learn about the request and response objects and how to work with streamed data. Next, you will explore URL handling, managing file uploads, working with authentication headers, and how to make requests to external APIs. Finally, you will delve into some common libraries offered by the community that help make development a breeze. By the end of this course, you will have the skills and knowledge needed to start building your own web applications with Node.js.

Table of contents
  1. Course Overview
  2. Managing HTTP Requests
  3. Managing HTTP Responses
  4. Handling File Uploads with Formidable
  5. Making External API Requests

Understanding OAuth with Node.js

by Justin Boyer

Dec 11, 2019 / 1h 10m

1h 10m

Start Course
Description

What do you do when you need to integrate with a web service?

In this course, Understanding OAuth with Node.js, you’ll learn foundational knowledge required to implement OAuth in your Node.js application.

  • First, you’ll explore building an OAuth client.
  • Next, you’ll discover how to create an OAuth protected resource.
  • Finally, you’ll learn how to construct an authorization server.
When you’re finished with this course, you’ll have the skills and knowledge of OAuth needed to integrate with and protect web services and to understand Node.js.

Table of contents
  1. Course Overview
  2. OAuth 2.0 in Action
  3. Building the OAuth Client
  4. Building the Protected Resource
  5. Building the Authorization Server

Managing Files with Node.js

by Nate Taylor

Oct 18, 2019 / 1h 26m

1h 26m

Start Course
Description

Reading and writing files are powerful features in Node.js but used less frequently. In this course, Managing Files with Node.js, you’ll learn foundational knowledge to efficiently read and write files with Node.js in practice. First, you’ll explore reading files asynchronously and synchronously. Next, you’ll discover how to effectively write files. Finally, you’ll learn how and when to use streams for file manipulation. When you’re finished with this course, you’ll have the skills and knowledge of file manipulation needed to read and write files using Node.js.

Table of contents
  1. Course Overview
  2. Reading an Entire File
  3. Reading Parts of a File
  4. Writing to a File
  5. Reading and Writing to Streams

Async Patterns in Node.js

by Brice Wilson

Feb 28, 2020 / 1h 26m

1h 26m

Start Course
Description

Node.js was built to run on a single thread using non-blocking I/O calls. Building apps for this environment requires extensive use of asynchronous code. In this course, Async Patterns in Node.js, you'll learn multiple techniques to write efficient asynchronous code using modern JavaScript. First, you’ll explore how the Node event loop works and how to write asynchronous code with callbacks that adhere to conventions followed in the Node community. Next, you’ll discover how to use Promises and the async/await keywords to write asynchronous code that’s easier to read. Finally, you’ll learn how to write event-driven code with EventEmitters and use worker threads to tackle CPU-intensive tasks in your Node apps. When you’re finished with this course, you’ll have the skills and knowledge of asynchronous programming necessary to build performant Node apps using accepted best practices.

Table of contents
  1. Course Overview
  2. The Event Loop and the Need for Asynchronous Code
  3. Writing Asynchronous Code with Promises and async/await
  4. Writing Event-driven Code with EventEmitters
  5. Utilizing Worker Threads

Mocking Node.js with Sinon

by Nate Taylor

Jan 31, 2020 / 1h 25m

1h 25m

Start Course
Description

Creating unit tests that are independent of external systems can be difficult and intimidating. In this course, Mocking Node.js with Sinon, you’ll learn to use the Sinon library for mocking external dependencies while testing your code. First, you’ll explore why mocking matters. Next, you’ll discover the differences between mocks, stubs, spies, and fakes. Finally, you’ll learn how to use a mock in your unit tests. When you’re finished with this course, you’ll have the skills and knowledge of using mocks needed to write unit tests isolated from external dependencies.

Table of contents
  1. Course Overview
  2. Spying on Functions
  3. Replacing Functions with Stubs
  4. Simplifying with Fakes
  5. Using Mocks to Isolate Code
Project

Build an Image Processing Server

by Auggie Hudak

Jan 23, 2020 / 1h

1h

Start Project
Description

In this project you will follow along with our instructions and first build an http server that you can upload and store photos on. After that we will utilize worker threads to create a resized versions and a monochrome version of the photo.

Project overview
  1. Setup1h
  2. Creating the image upload page15m
  3. Storing the image on disk25m
  4. Serving the photo-viewer and creating the workers25m
  5. Creating the parent thread45m