Advanced Express

Advanced Express

English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 2h 30m | 1.20 GB

Node.js is one of major platforms for the web and Express is one of the most popular Node frameworks. This course is designed to take your development skills to the next level, with advanced techniques that will enable you to tackle more complex projects with Express. Learn how to integrate a database, build a proper user authentication and authorization system, securely upload files, process and serve images, and deploy your Express apps to production. Daniel also provides instructions for building a login form, improving performance with a cluster module, and securing your application. A complete startup project is included in the exercise files, so you can follow along with the lessons and have a solid foundation for future Express projects.

Topics include:

  • Creating a template engine
  • Using MongoDB and Mongoose for user management
  • Authenticating and authorizing users
  • Adding cookies and sessions to Express
  • Creating a login form with Passport
  • Handling file uploads
  • Storing and serving images
  • Deploying an Express application
  • Securing an Express application
  • Running behind a web server
Table of Contents

Introduction
1 Tackle any project with Express
2 What you should know
3 Get your tools ready
4 Understanding and running the sample project

Know the Building Blocks and Internals of Express
5 Exploring Express components and APIs
6 Important Express middleware
7 Creating a template engine for Express

Use MongoDB and Mongoose to Manage Users
8 Setting up a hosted MongoDB server
9 Connecting to MongoDB
10 Adding MongoDB and Mongoose to an Express project
11 Creating a user schema for Mongoose
12 Using bcrypt to hash and validate passwords
13 Adding password encryption and validation to a Mongoose model
14 Creating a user registration route
15 Testing the form and reviewing the data in MongoDB

Authenticate and Authorize Users
16 Understanding cookies and sessions
17 Adding cookies and sessions to Express
18 Inspecting the session object
19 Introduction to Passport
20 Adding Passport to Express
21 Setting up an authentication strategy for Passport
22 Serializing and deserializing users
23 Creating a login form with Passport
24 Providing a logout link
25 Authentication vs. authorization
26 Protecting routes

Handle File Uploads and Process Images
27 File upload basics
28 Handling multipart form data with multer
29 Resizing and storing images with sharp
30 Creating an image handling middleware
31 Serving images

Deployment and Running in Production
32 Tuning Express performance – NODE ENV and compression
33 Tuning Express performance – Further measures
34 Add logging
35 Using the Node.js cluster module
36 Securing an Express application
37 Deployment and operation with PM2
38 Running behind a web server

Conclusion
39 Next steps