Introduction to Node: The Fundamentals

84 minutes

Understanding Node.js can have a significant positive impact on your career as a Javascript developer. Knowing how it works, how it scales, and how to interact with it can save you time, headaches and delays going to production which can put you well ahead of your competition. Understanding node.js can help you architect applications that are built to work with node's features and capabilities.

Key Goals:
* Understand the built-in features of node and how they operate
* Learn to architect applications in such a way that allows your app to scale
* Leverage tools and packages created by others to rapidly grow your applications features and capabilities
* Comprehend nodes’ built-in modules for communication and how to use those to extend your application interface
* Use debugging tools to identify and resolve errors in your code
Implement best-practice TDD and BDD principles to ensure your code is scalable, maintainable, and reproducible

pro-course-rss-logo

PRO RSS Feed

Use the node.js REPL shell

Understand Callbacks in Node.js

P

Understand the node.js process object

Understand Global Namespace in Node.js

Understand Node.js Buffers

Create a Simple Node.js Module

P

Export Modules in Node.js

P

Install packages in a Node.js application using npm

Create a tcp server using the Node.js Net Module

P

Publish and Share a Node.js Module

P

Build a Simple HTTP Server with Node.js

P

Publish a Module to the NPM Registry

P

Add and Remove EventEmitters in Node.js

P

Manage Memory and Garbage Collection in Node.js

P
node tutorial about Use the node.js REPL shell

Use the node.js REPL shell

4:19 node

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.

node tutorial about Understand Callbacks in Node.js

Understand Callbacks in Node.js

7:03 node 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.

node tutorial about Understand the node.js process object

Understand the node.js process object

6:26 node

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.

node tutorial about Understand Global Namespace in Node.js

Understand Global Namespace in Node.js

4:42 node

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.

node tutorial about Understand Node.js Buffers

Understand Node.js Buffers

10:30 node

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().

node tutorial about Create a Simple Node.js Module

Create a Simple Node.js Module

6:23 node 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

node tutorial about Export Modules in Node.js

Export Modules in Node.js

5:50 node 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.

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

Install packages in a Node.js application using npm

8:14 node

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.

node tutorial about Create a tcp server using the Node.js Net Module

Create a tcp server using the Node.js Net Module

3:54 node 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.

node tutorial about Publish and Share a Node.js Module

Publish and Share a Node.js Module

4:30 node 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.

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

Build a Simple HTTP Server with Node.js

4:08 node 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.

node tutorial about Publish a Module to the NPM Registry

Publish a Module to the NPM Registry

3:22 node 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

node tutorial about Add and Remove EventEmitters in Node.js

Add and Remove EventEmitters in Node.js

6:00 node 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.

node tutorial about Manage Memory and Garbage Collection in Node.js

Manage Memory and Garbage Collection in Node.js

8:40 node PRO

In this lesson, you will learn how to use view and interpret the garbage collection activity of your node.js app via the console. You will also learn how to take heapdump snapshots and analyze them with Chrome Developer Tools to identify possible memory leaks. A sample app with a known memory leak is provided as part of the walk-through to illustrate how to use the tools in your own environments.

Presented by:

Will Button

Startups | Fitness | Data | Performance

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