All about NodeJS
4.6 (1,444 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
12,133 students enrolled

All about NodeJS

Create & Deploy High Performance Node JS Apps on the Cloud and More !
4.6 (1,444 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
12,133 students enrolled
Created by Sachin Bhatnagar
Last updated 8/2019
English [Auto]
Current price: $34.99 Original price: $49.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 15.5 hours on-demand video
  • 4 articles
  • 20 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Build High Performance and Scalable Apps using NodeJS
  • Learn about ES6 with my free eBook - ECMAScript 6 QuickBytes
  • Use NodeJS Streams to write a Web Server
  • Use the Node Package Manager (NPM) for managing dependencies
  • Use the Express 4 Framework for building NodeJS Apps
  • Use the EJS templating language
  • Understand MongoDB as a NoSQL Database
  • Create & Use MongoDB Databases using services like MongoLab
  • Create Realtime Apps that use Web Sockets
  • Upload & Resize Images using NodeJS
  • Integrate Authentication using Social Media Sites like Facebook
  • Structure the NodeJS app into modules
  • Create and Deploy EC2 Cloud Server Instances on Amazon Web Services
  • Create and Use Amazon's S3 Storage Service with NodeJS
  • Use Amazon's Cloudfront Service
  • Using Amazon's Elastic IP
  • Configure Security Groups, Ports & Forwarding on Amazon EC2
  • Deploy a NodeJS app on the EC2 Instance
  • Deploy a NodeJS app on Heroku
  • Deploy a NodeJS app on Digital Ocean
  • Install & Deploy NGINX as a Reverse Proxy Server for NodeJS Apps
  • Configure NGINX as a Load Balancer
  • Learn about Enterprise Integration
  • Create an app using the incredible Hapi framework
  • Learn more about logging using the Hapi framework
  • Learn to use ES6 with Nodejs
  • Install & Deploy Apache Apollo MQ with Nodejs and a Python Script
Course content
Expand all 136 lectures 15:52:02
+ Prologue
2 lectures 16:17

Thank you for joining this comprehensive course on NodeJS. I'm delighted to have you here. This video explores NodeJS from its fundamental concepts to its use case scenarios as well as establishes reasons why its becoming one of the hottest technologies to master.

Preview 14:19

NodeJS 4.x has brought native support for ECMAScript 6, out in the wild. So, here's a free eBook for everyone to get up and running with ECMAScript 6 today!

Since this course is being upgraded, all new lectures will support ES6. So, do read this work in progress document.

Also present is an Update Log that will keep you upto speed on the status of the course revision process.

Before You Begin | ECMAScript 6 QuickBytes | Free eBook
+ Installing NodeJS
4 lectures 11:44

In this video, we will download and install NodeJS on our Windows PC. To download NodeJS go to

Installing NodeJS on Windows

In this video, we will download and install NodeJS on our Mac. To download NodeJS go to

Preview 01:42

There are many ways of installing NodeJS on Linux. In this screencast, we'll use the Node Version Manager - N to install NodeJS and npm on Ubuntu.

Installing NodeJS on Linux (Ubuntu)
Installing and using muliple versions of NodeJS (Only on Mac/Linux)
+ NodeJS Fundamentals
13 lectures 02:23:45
Before You Begin : Important Note

NodeJS provides an interactive terminal/shell based coding environment called R-E-P-L which stands for Read-Evaluate-Print-Line. A REPL interface executes one line or a code block at a time and hence is interactive. We can use Node's REPL for quickly experimenting with code.

Preview 03:23

In this lecture, you'll learn how to write your very first app with NodeJS - A Server that prints Hello NodeJS in the browser.

Hello NodeJS

Routing refers to handling requests from users. In this lecture, we'll understand how requests and responses work in NodeJS and we'll take our first steps at understanding the process of routing.

Hello Routing! | Understanding how Requests & Responses work

In this screencast, we begin by writing a router that can handle GET requests.

Hello Routing! | Handling GET Requests

Our router graduates up to handle POST requests in this screencast.

Hello Routing! | Handling POST Requests

So how exactly do the requests and responses work in NodeJS?

NodeJS at its core

How about writing a web server that serves a static HTML website!

Build a Web Server | Basic

It is very easy to write badly tangled up asynchronous code. So, let's detangle right away using Promises.

Promise me you'll never callback

Streams is an amazing feature. Know all about it, in this screencast.

Build a Web Server | Using Streams

Modules help break down a bigger app into manageable chunks. In this screencast, you'll use an existing module to write an app that generates QR Codes. And we get to use NPM!

Modules & NPM

Finally, we get to write our very own module.

Writing your own Module!
Enigma v2
+ MongoDB 101
4 lectures 31:06

MongoDB is a NoSQL database that stores data as documents in a format similar to JSON instead of using tables with rows and columns such as in a traditional RDBMS like MySQL MongoDB is schema-less which is pretty awesome for modern day product development lifecycles that need to be very dynamic and flexible. In this video, you'll be introduced to MongoDB.

Introduction to MongoDB

Though we will be using a hosted MongoDB Implementation for our production examples in this course, in this video, we will download the MongoDB installer for Windows and we'll set it up to run as a windows service.

Preview 09:48

Here's how to install MongoDB locally on a Mac. For Mongo Shell and basic commands, refer to Lecture 10.

Installing MongoDB on a Mac

In this screencast, we'll play with the MongoDB Shell, a command line based interface to MongoDB, also based on the Chrome V8 engine.

Playing with the MongoDB Shell
+ NodeJS Frameworks
3 lectures 26:38
What are frameworks?
Express and the MEAN Stack
Beyond the MEAN Stack
+ ChatCAT - Creating a Realtime Multiroom Chat App & Deploying it on Heroku
59 lectures 06:06:36
The Goal
Structuring the app
Examining the user interface
Installing Nodemon
Hello Express!
Middleware Ahoy!
The View Renderer
Serving Static Assets
Express Router : First Steps
Express Router : The routes object
Express Router : Mounting the routes - 1
Express Router : Mounting the routes - 2
Express Router : Handling a 404
Do we need a database? Yes we do!
MongoDB as a service |
Migrating to MongoDB Atlas - IMPORTANT
Environments and the config loader
Mongoose and the database module
Sessions 101
Implementing sessions using the express-session middleware
Social Authentication : An Introduction
Social Authentication : Introduction to Passport
Social Authentication : Installing Passport & Strategies
Social Authentication : Registering the app on Facebook
Social Authentication : Facebook Strategy
Social Authentication : Database helpers
Social Authentication : Serializing & deserializing user data
Social Authentication : Routes
Updates to Facebook Login | Enforcing HTTPS
Social Authentication : Rendering name and profile picture
Social Authentication : Registering the app with Twitter
Social Authentication : Twitter Strategy
Social Authentication : The logout button
Social Authentication : Securing routes
03:24 | An introduction
07:22 | Installation and rewiring the server
03:57 | Storing chat rooms and user data
03:48 | Bridging with Session
02:25 | Setting up the Rooms Page
Socket.IO | Rendering the list of chatrooms
Socket.IO | Creating a new chatroom
Socket.IO | The chatroom route
Socket.IO | Joining a chatroom
Socket.IO | Updating the list of active users
Socket.IO | When a user leaves or disconnects
Socket.IO | The chat functionality
Sending images using Cloudinary (Optional)
Socket.IO | Scaling with Redis
Logging with Winston
Logging requests using Morgan
Heroku | An introduction
Heroku | Installing the Heroku Toolbelt CLI
Heroku | Preparing for deployment
Heroku | Setting up configuration variables
Heroku | Provisioning Redis
Heroku | Reconfiguring Facebook & Twitter and Deployment!
Heroku | Monitoring your app
Scaling up - An insight | Summary
+ Node.JS on Amazon Web Services !
23 lectures 02:44:17

PhotoGRID is a photo gallery app that we'll build using NodeJS. We will build this app based on technologies that we've learnt so far and we'll take our experience one notch higher by integrating & deploying our app on the Amazon Elastic Compute Cloud (EC2). We will also use a couple of other AWS Services like the S3 Storage Service, Elastic IP & Cloudfront.

Introduction to Project PhotoGRID

This document should be read properly to avoid potential problems with this chapter.

IMPORTANT : Before you Begin
2 pages

As in the ChatCAT example, the User Interface files have been provided. We'll examine the user interface in this video.

Examining the User Interface & Getting Started

In this video, we'll download Express 4.0 - one of the most popular frameworks for making NodeJS apps. Once done, we'll create a basic scaffold for a working Express app. We'll also install SocketIO & Hogan-Express modules as well.

Creating the Express App & Setting up

In this video, we'll create a Routes module like how we created in the ChatCAT example.

Creating the Routes.js module

In this video we'll create configuration files and a module to manage development and production environments.

Creating Configuration Files

Amazon is the global leader in Cloud Computing Services. In this video, we'll signup for an account on Amazon Web Services and we'll begin by provisioning an S3 (Simple Storage Service) Bucket to store all the photos that the user uploads via PhotoGRID.

Amazon Web Services | Signing Up & Creating an S3 Bucket

Access to an Amazon S3 Bucket depends on a bucket policy, without which users would be unable to access files. In this video we'll create a bucket policy.

Amazon Web Services | Setting up a Bucket Policy

To enable our PhotoGRID app to interact with the Amazon S3 Bucket, we'll use the KnoxJS module. In this video we'll download and setup the KnoxJS module.

Amazon Web Services | Setting up Knox

In this video, we'll prep our front end to transfer files using a custom built AJAX function. Instead of using jQuery or similar libraries, we'll cook our own AJAX function.

Setting up the Upload Button Handler & AJAX

Once the Javascript on the front end UI sends the file using AJAX, we'll use the Formidable module to receive the files within the NodeJS app. In this video we'll download and setup Formidable so it is able to receive files.

Setting up Formidable for Receiving the files

Before we put uploaded images into the S3 bucket, we will resize them down to a width of 300 pixels. To achieve that, we'll use the GraphicsMagick Image Processing Library along with the gm module in NodeJS which will interact with GraphicsMagick to resize the images.

Setting up GraphicsMagick Library + gm for Nodejs for resizing images

In this video we'll write code which uploads files after they've been resized using GraphicsMagick to the S3 bucket using the Knox module.

Uploading resized images to the S3 using Knox

In this video, we'll create a MongoDB database on MongoLab and we'll store the name of our file and the initial vote count in a collection. Additionally we'll also delete the image file as locally stored on the server during the resizing process.

Storing the file name and votes in MongoDB on MongoLab

As Photos are uploaded, the gallery portion of our PhotoGRID website should also update to reflect all images.

Getting images into the Photogrid gallery

Since we're serving image files from our S3 bucket onto our PhotoGRID gallery, we need to optimize S3 for delivery. This can be done by using Amazon's CloudFront service which turns our S3 bucket into a Content Delivery Network (CDN) that is optimized for delivery.

Amazon Web Services | Setting up CloudFront Distribution

PhotoGRID also incorporates a vote-up functionality that lets users upvote images that they like. I've kept the functionality very simple and as a matter of fact it allows you to keep clicking to increase the vote count which is unlike how it would be in a production case scenario. However, this should whet your appetite enough to build a more practical version of the vote-up functionality. We'll also test our app so its ready for deployment.

Creating the Vote Up Functionality & Final Testing

An Amazon Elastic Compute Cloud Instance (EC2) is a server in the cloud that you can easily instantiate and setup. It comes with an OS of your choice with full root access to let you install, and setup virtually anything. In this video, we'll spin up our EC2 instance in preparation for deploying our NodeJS App.

Amazon Web Services | Creating an Elastic Compute Cloud (EC2) Instance

To run NodeJS apps, we need to install NodeJS on our EC2 instance. This video shows you how.

Amazon Web Services | Installing NodeJS on EC2

So far we've been accessing the EC2 instance using a public DNS which can change if the server is restarted. To ensure we're able to access the server, we'll setup an Elastic IP which binds our server to a fixed IP address. This ensures that even if we restart our EC2 instance, we would still be able to access the server using the fixed IP provided to us by Elastic IP.

Amazon Web Services | Creating an Elastic IP for your EC2 Instance

And the big moment arrives when we finally deploy the PhotoGRID app on our EC2 instance !

Amazon Web Services | Installing the Photogrid App on the EC2 Instance

Before we can access the NodeJS app, we need to setup our security group, open ports and ensure that Port 80 (HTTP) forwards to our PhotoGrid NodeJS App typically running on Port 3000.

Important :: It should be noted that practically speaking, we should use NGINX Web Server as a front facing server that routes requests from Port 80 to Port 3000 on the NodeJS app through reverse proxying requests. This is demonstrated exclusively in the next section in this course. For now, I've kept the deployment easy to understand by simply forwarding Port 80 to Port 3000.

Amazon Web Services | Security Group, Ports & Port Forwarding

Imagine a situation where your EC2 instance reboots. This would mean that the NodeJS app would not come back online since so far we've been launching it manually from the terminal. We'll correct this in this video by making sure the app runs automatically when the server starts up.

Amazon Web Services | Ensuring the Photogrid app runs automatically
+ NodeJS and NGINX for the Kill !
7 lectures 37:55
What are we talking about ?

Cloud9 combines a powerful online code editor with a full Ubuntu workspace in the cloud.

The Awesome Cloud9 IDE

Digital Ocean has become the third fastest growing Cloud Hosting provider in the world and is competing directly with the biggies such as Amazon. Digital Ocean has been designed with developers in mind and gets you up and running in no time with no complexity involved at all.

Spinning a Droplet on Digital Ocean & Using Cloud9IDE

NGINX is a super fast Web Server, Proxy Server and a Load Balancer, all rolled into one. By placing NGINX infront of your NodeJS apps, you can deliver static assets such as images, css files and javascript files directly without routing them through the Node app which negatively affects performance. In this video, we'll install NGINX on our Digital Ocean server instance (Droplet)

Installing Nginx

By using NGINX as a reverse proxy server for our NodeJS app, we get optimum performance because NGINX takes over serving static files including caching.

Nginx as a Proxy Server for NodeJS

In this video we'll install our good old ChatCat on the Digital Ocean Server using NGINX as a reverse proxy. Download the accompanying archive that contains a slightly modified ChatCAT App that is ready to be installed on the Digital Ocean instance.

Uploading and Reconfiguring ChatCAT to work with Nginx

A Load Balancer distributes the incoming user traffic over a cluster of servers so as not to overload a single server instance. NGINX is a terrific load balancer that is super easy to configure. In this video, I'll show you to how to configure NGINX when using it as a Load Balancer.

Load Balancing with NGINX
+ Enterprise Integration | ES6 | HapiJS
19 lectures 02:30:27

Enterprise integration refers to the process of getting software across a gamut of platforms and servers to talk and share data with each other.

Introduction to Enterprise Integration

In this video, we'll setup base and foundation for an example Node.js app that we'll write in this section that demonstrates interoperability between a Node.js app and a Python script. This is going to be purely for demonstration purposes only and this process can be adapted to any scenario.

The task at hand

This section uses a provided Python script. This video shows you to how to set it up on a Mac (OS X Yosemite)

Installing Python dependencies on a Mac
This section uses a provided Python script. This video shows you to how to set it up on a PC running Microsoft Windows 10
Installing Python dependencies on Windows

Apache Apollo is the next generation of Apache ActiveMQ, one of the most popular message queue solutions out there. In this video, you'll learn how to set it up on a Mac (OS X Yosemite)

Installing Apache Apollo on a Mac
Apache Apollo is the next generation of Apache ActiveMQ, one of the most popular message queue solutions out there. In this video, you'll learn how to set it up on a PC running Microsoft Windows 10
Installing Apache Apollo on Windows

Once installed, we'll configure Apache Apollo to create our users and designate queues or channels which will carry our data to and from the Python script.

Configuring Apache Apollo | Users and Queues

Hapi is an amazing enterprise grade Node.js framework from Walmart Labs.

Introduction to the Hapi Framework

Set up your first app using the Hapi framework.

More about arrow functions on Youtube : Coming up on Monday, 5th October.

Hello Hapi and a bit of ES6

In this video, you'll setup your core plugin which will contain all the functionality and routes related to this app.

Writing the Core Plugin | Routes & Views

Our good old is always there. Learn how to set it up with Hapi.

Setting up

In this video, we'll setup the Stomp client which will enable our Hapi app to talk to Apache Apollo. We'll also learn how to use dot files to store access credentials including how to do it in the correct way.

Setting up the Stomp Client & Storing Access Credentials

The only button in our app can be enabled or disabled based on the state of the app and data. This video shows you how.

The 'Process' Button State

Before you dive into code and nail down the core function of this app, try and understand how it works in the first place.

Core Functionality : The Workflow

In this video, we'll code our app's core functionality.

Core Functionality : The Code
UPDATE : Fixing the Array.observe() deprecation issue

In this video we'll fix a tiny issue which occurs when the user refreshes the page in the browser after we've received all the data back from Apollo.

Fixing data retrieval on a page refresh

Logging and Process Monitoring is essential for server level apps. In this video, we'll examine how Hapi plugins allow you to log events and errors to a file.

Logging using Hapi

Thank You :)

+ Epilogue
2 lectures 00:18
Recommended Reading & Resources
1 page
BONUS : Join my inner circle of friends!
  • Working knowledge of HTML, CSS and Javascript
  • Basic Working knowledge of an image editing application such as Adobe Photoshop would also help, but is not necessarily needed.

About this Course

NodeJS is a platform that allows developers to write server side high performance and networked applications. And that too using good old Javascript. But wait ! Isn't Javascript meant to be used for forms and stuff on web pages ?

Well that was 10 years ago. The world has gone from 'Oops! You've not filled up the form properly !' days to today's modern web apps and social media sites that rely heavily on Javascript. Google Apps, Facebook, Twitter, Google Plus and LinkedIn, being handful examples of this movement. And to think that this quantum leap would not have been possible without Javascript is not an overstatement. Today, when you socialize with your friends on Facebook, or use your Gmail inbox, you're running thousands of lines of code written in Javascript, in your browser.

With Node JS, you can take this knowledge back on the server, where usually you would expect to see the likes of PHP, Ruby, ASP dot NET etc. But that's only a small portion of the reason why NodeJS is so cool. The fact that you can write full blown networked applications (think chat servers, collaborative tools, real-time data visualisation apps) with just a few lines of code is more than reason enough to not only look at NodeJS, but deep dive into it !

But I know PHP ? Why should I learn NodeJS ? Well, for starters, learning something new never hurts. But most importantly, learning NodeJS is great because :

  1. Node allows you to write highly scalable networked apps deployed on the cloud !
  2. You're working at a different level of application design per se with Node and that means that you're not writing an app that sits on top of a stack, you design the stack from the server up. And while that may sound daunting, it really is not and you'll see why.
  3. You code in the same language, both on the server and on the front end ! We're all polyglots (we use multiple programming languages and syntax in most of our projects), but managing code in the same language on the back-end and the front-end never hurts and in-fact can be a huge time saver when debugging.
  4. NodeJS is used by the likes of LinkedIn, Yahoo and Microsoft to name a few. Its pretty new and consequently you gain advantage from the exponentially growing community of NodeJS & Javascript developers and that's great fun, really !
  5. If you've been coding in Javascript, you can leverage your existing knowledge and skills and take it to a whole new level !

The Real Problem

So, NodeJS sounds pretty interesting so far, but what really hit me in the face when I was learning all about Node was the fact that, with any new platform, framework or technology, you need to take baby steps, all the way through, to making real world examples, if you have to get to the grips of it. And that leads us to why you're here.

In this course, we'll go from absolute scratch, all the way up to building and deploying full blown NodeJS app on the Cloud !

Project Oriented Learning

With NodeJS, we will build two full blown apps. We will go all the from concept creation, UI/UX design to coding and deploying our app on the cloud.

A. ChatCAT - One of the fun things that you can do with NodeJS is build realtime apps that allow a high number of concurrent users to interact with each other. Examples of this kind include Chat Servers, Gaming Servers, Collaborative Tools etc. We will build a multi-room chat server that allows users to login via Facebook, Create Chatrooms of their choice and Chat in realtime. We will not only create this app, but also deploy it on Heroku and Digital Ocean !

You will learn all about using Websockets, Structuring your App in an efficient manner, creating and using development & production configurations, Authentication using Facebook, Setting up an App on Facebook, Managing Sessions, Querying & Using a Hosted MongoDB Database, Using Heroku & Digital Ocean's Cloud Services and lots more...

B. PhotoGRID - The second complete app that we will build in this course is a Photo Gallery app which lets users upload images into a gallery with the ability to vote up the images that they like. This NodeJS app lets users upload files, which are then resized to thumbnails on the server and stored in an Amazon S3 Bucket for optimal delivery to the front end interface. The entire app runs on an Amazon EC2 Cloud Server which we will create from scratch and configure for use.

You will learn about managing file uploads using NodeJS & AJAX, Resizing Images on the Server, Accessing & Storing files in an S3 Bucket, Querying & Using a Hosted MongoDB Database, Using Amazon's Elastic IP Service & Cloudfront distribution, ensuring your NodeJS app runs automatically even if the server is restarted and lots more...

In the projects above, we leave no stone unturned in terms of execution. This is a complete hands-on course that is not just limited to NodeJS but to the ecosystem that needs attention when a NodeJS app is built and deployed. My intent is hand hold you all the way from writing your first app to deploying production level apps on the cloud.

And I'm always available to personally help you out, should you get stuck.

BONUS :: Here's the best thing about this course. The curriculum that you see gets you up and running with NodeJS & Cloud Deployment. However, there is so much more that you can do with NodeJS, which is why I will keep adding new lectures and sections to this course on an ongoing basis. There is so much more that you will get with full lifetime access to lectures and all updates !!

So, join in the fun !

Who this course is for:
  • Understand the inner workings of NodeJS
  • Web Designers & Front End Developers who wish to extend their knowledge of Javascript for building high performance network applications.
  • Software Developers who want to build high performance network applications.
  • Absolute beginners with basic knowledge of HTML, CSS and Javascript, wanting to upgrade to professional Web Development and Building Web Apps.
  • Anyone who wishes to get hands-on training with setting up an Amazon EC2 Instance with a host of other services like Cloudfront, Elastic IP and S3
  • Anyone who wishes to get hands-on training with deploying a NodeJS app on the cloud
  • Computer Engineering students
  • Tech Entrepreneurs who want to get their hands down and dirty with Web Coding & App Development.
  • Anyone who wishes to stay on the forefront of technology !
  • PHP, ASPnet, Perl, Java & Ruby coders wanting to leap onto the NodeJs bandwagon.