All about NodeJS

All about NodeJS
All about NodeJS
English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 15.5 Hours | 2.77 GB

Create & Deploy High Performance Node JS Apps on the Cloud and More !

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 !

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.

What Will I 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
Table of Contents

Prologue
1 What is NodeJS
2 Before You Begin ECMAScript 6 QuickBytes Free eBook

Installing NodeJS
3 Installing NodeJS on Windows
4 Installing NodeJS on a Mac
5 Installing NodeJS on Linux (Ubuntu)
6 Installing and using muliple versions of NodeJS (Only on MacLinux)

NodeJS Fundamentals
7 Before You Begin Important Note
8 Read-Evaluate-Print-Line REPL Hello Node
9 Hello NodeJS
10 Hello Routing Understanding how Requests Responses work
11 Hello Routing Handling GET Requests
12 Hello Routing Handling POST Requests
13 NodeJS at its core
14 Build a Web Server Basic
15 Promise me youll never callback
16 Build a Web Server Using Streams
17 Modules NPM
18 Writing your own Module
19 Enigma v2

MongoDB 101
20 Introduction to MongoDB
21 Installing MongoDB on Windows
22 Installing MongoDB on a Mac
23 Playing with the MongoDB Shell

NodeJS Frameworks
24 What are frameworks
25 Express and the MEAN Stack
26 Beyond the MEAN Stack

ChatCAT – Creating a Realtime Multiroom Chat App Deploying it on Heroku
27 The Goal
28 Structuring the app
29 Examining the user interface
30 Installing Nodemon
31 npm init and here we go
32 Hello Express
33 Middleware Ahoy
34 The View Renderer
35 Serving Static Assets
36 Express Router First Steps
37 Express Router The routes object
38 Express Router Mounting the routes – 1
39 Express Router Mounting the routes – 2
40 Express Router Handling a 404
41 Do we need a database Yes we do
42 MongoDB as a service MongoLab.com
43 Environments and the config loader
44 Mongoose and the database module
45 Sessions 101
46 Implementing sessions using the express-session middleware
47 Social Authentication An Introduction
48 Social Authentication Introduction to Passport
49 Social Authentication Installing Passport Strategies
50 Social Authentication Registering the app on Facebook
51 Social Authentication Facebook Strategy
52 Social Authentication Database helpers
53 Social Authentication Serializing deserializing user data
54 Social Authentication Routes
55 Updates to Facebook Login Enforcing HTTPS
56 Social Authentication Rendering name and profile picture
57 Social Authentication Registering the app with Twitter
58 Social Authentication Twitter Strategy
59 Social Authentication The logout button
60 Social Authentication Securing routes
61 Socket.io An introduction
62 Socket.io Installation and rewiring the server
63 Socket.io Storing chat rooms and user data
64 Socket.io Bridging Socket.io with Session
65 Socket.io Setting up the Rooms Page
66 Socket.IO Rendering the list of chatrooms
67 Socket.IO Creating a new chatroom
68 Socket.IO The chatroom route
69 Socket.IO Joining a chatroom
70 Socket.IO Updating the list of active users
71 Socket.IO When a user leaves or disconnects
72 Socket.IO The chat functionality
73 Sending images using Cloudinary (Optional)
74 Socket.IO Scaling with Redis
75 Logging with Winston
76 Logging requests using Morgan
77 Heroku An introduction
78 Heroku Installing the Heroku Toolbelt CLI
79 Heroku Preparing for deployment
80 Heroku Setting up configuration variables
81 Heroku Provisioning Redis
82 Heroku Reconfiguring Facebook Twitter and Deployment
83 Heroku Monitoring your app
84 Scaling up – An insight Summary

Node.JS on Amazon Web Services
85 Introduction to Project PhotoGRID
86 PhotoGrid-Before-You-Begin
87 Examining the User Interface Getting Started
88 Creating the Express App Setting up Socket.io
89 Creating the Routes.js module
90 Creating Configuration Files
91 Amazon Web Services Signing Up Creating an S3 Bucket
92 Amazon Web Services Setting up a Bucket Policy
93 Amazon Web Services Setting up Knox
94 Setting up the Upload Button Handler AJAX
95 Setting up Formidable for Receiving the files
96 Setting up GraphicsMagick Library gm for Nodejs for resizing images
97 Uploading resized images to the S3 using Knox
98 Storing the file name and votes in MongoDB on MongoLab
99 Getting images into the Photogrid gallery
100 Amazon Web Services Setting up CloudFront Distribution
101 Creating the Vote Up Functionality Final Testing
102 Amazon Web Services Creating an Elastic Compute Cloud (EC2) Instance
103 Amazon Web Services Installing NodeJS on EC2
104 Amazon Web Services Creating an Elastic IP for your EC2 Instance
105 Amazon Web Services Installing the Photogrid App on the EC2 Instance
106 Amazon Web Services Security Group Ports Port Forwarding
107 Amazon Web Services Ensuring the Photogrid app runs automatically

NodeJS and NGINX for the Kill
108 What are we talking about
109 The Awesome Cloud9 IDE
110 Spinning a Droplet on Digital Ocean Using Cloud9IDE
111 Installing Nginx
112 Nginx as a Proxy Server for NodeJS
113 Uploading and Reconfiguring ChatCAT to work with Nginx
114 Load Balancing with NGINX

Enterprise Integration ES6 HapiJS
115 Introduction to Enterprise Integration
116 The task at hand
117 Installing Python dependencies on a Mac
118 Installing Python dependencies on Windows
119 Installing Apache Apollo on a Mac
120 Installing Apache Apollo on Windows
121 Configuring Apache Apollo Users and Queues
122 Introduction to the Hapi Framework
123 Hello Hapi and a bit of ES6
124 Writing the Core Plugin Routes Views
125 Setting up Socket.io
126 Setting up the Stomp Client Storing Access Credentials
127 The Process Button State
128 Core Functionality The Workflow
129 Core Functionality The Code
130 UPDATE Fixing the Array.observe() deprecation issue
131 Fixing data retrieval on a page refresh
132 Logging using Hapi
133 Summary

Epilogue
134 RecommendedReadingforNodejs
135 BONUS LECTURE Theres lot more