All about NodeJS
- 15.5 hours on-demand video
- 4 articles
- 20 downloadable resources
- Full lifetime access
- Access on mobile and TV
- Certificate of Completion
Get your team access to 4,000+ top Udemy courses anytime, anywhere.Try Udemy for Business
- 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
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.
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.
In this video, we will download and install NodeJS on our Mac. To download NodeJS go to www.nodejs.org
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
- Basic Working knowledge of an image editing application such as Adobe Photoshop would also help, but is not necessarily needed.
About this Course
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 :
- Node allows you to write highly scalable networked apps deployed on the cloud !
- 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.
- 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.
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 !
- Understand the inner workings of NodeJS
- Software Developers who want to build high performance network applications.
- 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.