Nodejs Master Class

Tags: Node.Js

Learn to build fast, scalable and secure RESTful services with Node, Express and MongoDB, from setup to production

Last updated 2022-01-10 | 4.7

- Build the backend for your web and mobile apps
- Use modern JavaScript features (ES6
- ES7)
- Implement CRUD operations

What you'll learn

Build the backend for your web and mobile apps
Use modern JavaScript features (ES6
ES7)
Implement CRUD operations
Handle and log errors
the right way
Write unit and integration tests
Practice test-driven development (TDD)
Store and retrieve complex data in MongoDB
Implement authentication and authorization
Deploy your Node apps to production
Apply the best practices for building fast
scalable and secure apps

* Requirements

* Basic familiarity with JavaScript

Description

What is Node.js?

Node.js, or Node, is a runtime environment for executing JavaScript code outside of a browser. It is ideal for building highly-scalable, data-intensive backend services (APIs) that power your client’s apps (web or mobile apps).


Why learn Node?

Node is great for prototyping and agile development as well as building super fast and highly scalable apps; Companies like Uber and PayPal use Node in production to build applications because it requires fewer people and less code. Plus, Node has the largest ecosystem of open-source library, so you don’t have to build everything from scratch.


A step-by-step, A to Z course

What you’ll get when you sign up for this course:

  • 15 hours of HD videos, complete with exercises and solutions

  • A real-world project: you'll build the back-end for a video rental application, not a dummy to-do app!

  • No more wasted time on lengthy courses or out-of-date tutorials

  • Up-to-date and practical information and solutions (no fluff!)

  • The opportunity to learn at your own pace - lifetime access - so take your time if you prefer

  • Expert tips to become a Node rockstar

  • The best practices and common pitfalls to avoid

  • Watch on any device, online or offline - mobile friendly and downloadable lessons

  • Certificate of completion to present to your employer


You’ll learn to:

  • Confidently build RESTful services (APIs) using Node.js, Express.js, and MongoDB

  • Employ the best practices for Node.js

  • Avoid common mistakes


What we’ll cover:

  • Node module system

  • Node Package Manager (NPM)

  • Asynchronous JavaScript

  • Useful ES6+ features

  • Implementing CRUD operations

  • Storing complex data in MongoDB

  • Data Validation

  • Authentication and authorization

  • Handling and logging errors the right way

  • Unit and integration testing

  • Test-driven development (TDD)

  • Deployment


This course is for you if:

You’re a back-end developer who is used to working with frameworks like ASP.NET, Rails, Django, etc. You want to add Node.js to your toolbox.

You’re a front-end developer and want to transition to full-stack development.

You’ve tried other Node.js tutorials and found them to be too slow, out-of-date, and boring!

Having Node.js on your resume helps you find more jobs and make more money.


And here is what other students say: 

"Absolutely the best! Highly recommended if you want to get started on Node.js from zero. I have learned what Node is and what it can do. Truly comprehensive. Perfect rating! Mosh knows his stuff and he deserves your support. On a side note, my current company uses Mosh's courses as a huge resource and reference when training / refreshing knowledge. I just want to say thank you! Please don't stop teaching. You were born with the talent to teach." -Eugene John Arellano


"Mosh is one of the top 3 instructors for modern web development. He explains difficult concepts with ease. I recommend all of his courses because of the amount of detail and his style of teaching." -Warren Isaac


"What I like most about the course is Mosh's methodology and the way how he explains the things. Very well structured course with high quality of presentation as well." -Omar Amrani


Who is your instructor?

Hi! My name is Mosh Hamedani and I help ambitious developers take their coding skills to the next level. I'm a software engineer with more than 15 years of experience and I've taught over 200,000 students through my online courses. My YouTube channel, Programming with Mosh, has been watched more than 6M times. My students describe my teaching as clear, concise, and fun, without any fluff.


Do you want to become a Node rockstar? Enroll in the course and get started.


Who this course is for:

  • You’re a back-end developer familiar with frameworks like ASPNET, Rails, Django, etc. Now, you want to add Node to your toolbox.
  • You’re a front-end developer and want to transition to full-stack development.
  • Having Node on your resume helps you find more jobs and make more money.

Course content

15 sections • 224 lectures

Welcome Preview 00:30

What is Node Preview 02:59

Node Architecture Preview 03:01

How Node Works Preview 04:23

Installing Node Preview 02:31

Your First Node Program Preview 02:19

Course Structure Preview 02:13

Recap Preview 00:00

Asking Questions Preview 00:33

Introduction Preview 00:28

Global Object Preview 03:21

Modules Preview 03:35

Creating a Module Preview 04:43

Loading a Module Preview 05:22

Module Wrapper Function Preview 04:40

Path Module Preview 04:08

OS Module Preview 04:18

File System Module Preview 04:50

Events Module Preview 06:17

Event Arguments Preview 03:08

Extending Event Emitter Preview 08:01

HTTP Module Preview 07:24

Recap Preview 00:00

Introduction Preview 03:41

Package.json Preview 02:54

Installing a Node Package Preview 03:33

Using a Package Preview 03:20

Package Dependencies Preview 03:18

NPM Packages and Source Control Preview 03:51

Semantic Versioning Preview 04:29

Listing the Installed Packages Preview 02:10

Viewing Registry Info for a Package Preview 02:45

Installing a Specific Version of a Package Preview 01:05

Updating Local Packages Preview 05:02

DevDependencies Preview 01:51

Uninstalling a Package Preview 00:40

Working with Global Packages Preview 02:33

Publishing a Package Preview 04:32

Updating a Published Package Preview 01:55

Recap Preview 00:00

Introduction Preview 00:47

RESTful Services Preview 05:57

Introducing Express Preview 02:19

Building Your First Web Server Preview 05:45

Nodemon Preview 01:30

Environment Variables Preview 03:13

Route Parameters Preview 03:22

Handling HTTP GET Requests Preview 04:45

Handling HTTP POST Requests Preview 03:42

Calling Endpoints Using Postman Preview 02:07

Input Validation Preview 07:58

Handling HTTP PUT Requests Preview 08:30

Handling HTTP Delete Requests Preview 04:44

Project- Build the Genres API Preview 01:18

Recap Preview 00:00

Introducion Preview 00:22

MIddleware Preview 02:48

Creating Custom Middleware Preview 04:23

Built-In Middleware Preview 03:57

Third-party Middleware Preview 03:55

Environments Preview 04:06

Configuration Preview 09:45

Debugging Preview 06:54

Templating Engines Preview 04:55

Database Integration Preview 01:36

Authentication Preview 00:29

Structuring Express Applications Preview 07:44

Project- Restructure the App Preview 03:05

Recap Preview 00:00

Synchronous Vs. Asynchronous Code Preview 05:51

Patterns For Dealing With Asynchronous Code Preview 03:07

Callbacks Preview 05:59

Callback Hell Preview 02:28

Named Functions to Rescue Preview 04:41

Promises Preview 08:37

Replacing Callbacks with Promises Preview 03:31

Consuming Promises Preview 05:31

Creating Settled Promises Preview 02:49

Running Parallel Promises Preview 06:14

Async and Await Preview 06:55

Exercise Preview 05:56

Introducing MongoDB Preview 02:00

Installing MongoDB on Mac Preview 03:58

Installing MongoDB on Windows Preview 05:39

Connecting to MongoDB Preview 03:52

Schemas Preview 03:48

Models Preview 04:18

Saving a Document Preview 03:33

Querying Documents Preview 04:18

Comparison Query Operators Preview 04:59

Logical Query Operators Preview 02:01

Regular Expressions Preview 03:20

Counting Preview 00:49

Pagination Preview 01:36

Exercise 1 Preview 07:57

Exercise 2 Preview 04:34

Exercise 3 Preview 03:19

Updating Documents- Query First Preview 03:35

Updating a Document- Update First Preview 06:14

Removing Documents Preview 02:38

Recap Preview 00:00

Validation Preview 06:59

Built-In Validators Preview 04:54

Custom Validators Preview 03:16

Async Validators Preview 02:35

Validation Errors Preview 03:37

SchemaType Options Preview 05:56

Project- Add Persistence to Genres API Preview 14:05

Project- Build the Customers API Preview 06:59

Restructuring the Project Preview 06:14

Recap Preview 00:00

Modelling Relationships Preview 07:45

Referencing Documents Preview 03:51

Population Preview 04:16

Embedding Documents Preview 06:54

Using an Array of Sub-documents Preview 04:31

Project- Build the Movies API Preview 07:05

Project- Build the Rentals API Preview 08:01

Transactions Preview 08:45

ObjectID Preview 07:03

Validating Object ID's Preview 06:13

A Better Implementation Preview 02:23

Recap Preview 00:00

Introduction Preview 04:01

Creating the User Model Preview 03:40

Registering Users Preview 07:53

Using Lodash Preview 05:21

Hashing Passwords Preview 06:54

Authenticating Users Preview 04:54

Testing the Authentication Preview 02:42

JSON Web Tokens Preview 05:04

Generating Authentication Tokens Preview 03:18

Storing Secrets in Environment Variables Preview 06:12

Setting Response Headers Preview 03:46

Encapsulating Logic in Mongoose Models Preview 07:11

Authorization Middleware Preview 06:50

Protecting Routes Preview 03:06

Getting the Current User Preview 04:03

Logging Out Users Preview 02:04

Role Based Authorization Preview 05:43

Testing the Authorization Preview 04:10

Recap Preview 00:00

Introduction Preview 03:02

Handling Rejected Promises Preview 03:07

Express Error Middleware Preview 04:40

Removing Try_Catch docs Preview 08:29

Express Async Errors Preview 03:18

Logging Errors Preview 06:36

Logging to MongoDB Preview 04:11

Uncaught Exceptions Preview 03:35

Unhandled Promise Rejections Preview 07:23

Error Handling Recap Preview 02:26

Refactoring Index.js- Extracting Routes Preview 04:54

Extracting the DB Logic Preview 03:22

Logging Preview 02:11

Extracting the Config Logic Preview 02:30

Extracting the Validation Logic Preview 01:53

Showing Unhandled Exceptions on the Console Preview 01:29

Recap Preview 00:00

What is Automated Testing? Preview 02:40

Benefits of Automated Testing Preview 02:37

Types of Tests Preview 04:00

Test Pyramid Preview 02:55

Tooling Preview 02:15

Writing Your First Unit Test Preview 05:00

Testing Numbers Preview 06:36

Grouping Tests Preview 01:51

Refactoring with Confidence Preview 02:43

Testing Strings Preview 03:24

Testing Arrays Preview 05:50

Testing Objects Preview 05:30

Testing Exceptions Preview 07:25

Continually Running Tests Preview 01:43

Exercise- Testing the FizzBuzz Preview 05:28

Creating Simple Mock Functions Preview 05:37

Interaction Testing Preview 05:00

Jest Mock Functions Preview 07:16

What to Unit Test Preview 03:06

Exercise Preview 07:39

Recap Preview 00:00

Introduction Preview 01:09

Preparing the App Preview 02:18

Setting Up the Test DB Preview 03:01

Your First Integration Test Preview 05:44

Populating the Test DB Preview 06:17

Testing Routes with Parameters Preview 03:19

Validating Object ID's Preview 03:31

Refactoring with Confidence Preview 02:04

Testing the Authorization Preview 02:39

Testing Invalid Inputs Preview 05:32

Testing the Happy Paths Preview 02:35

Writing Clean Tests Preview 08:40

Testing the Auth Middleware Preview 09:45

Unit Testing the Auth Middleware Preview 06:14

Code Coverage Preview 07:09

Exercise Preview 00:26

Recap Preview 00:00

What is Test-driven Development? Preview 02:54

Implementing the Returns Preview 02:33

Test Cases Preview 02:53

Populating the Database Preview 07:14

Testing the Authorization Preview 07:22

Testing the Input Preview 03:42

Refactoring Tests Preview 04:18

Looking Up an Object Preview 03:04

Testing if Rental Processed Preview 02:13

Testing the Valid Request Preview 02:23

Testing the Return Date Preview 04:15

Testing the Rental Fee Preview 04:50

Testing the Movie Stock Preview 05:37

Testing the Response Preview 03:36

Refactoring the Validation Logic Preview 06:44

Mongoose Static Methods Preview 06:12

Refactoring the Domain Logic Preview 04:04

Introduction Preview 01:21

Preparing the App for Production Preview 02:28

Getting Started With Heroku Preview 02:15

Preparing the App for Deployment Preview 01:55

Adding the Code to a Git Repository Preview 02:44

Deploying to Heroku Preview 03:44

Viewing Logs Preview 02:46

Setting Environment Variables Preview 02:44

MongoDB in the Cloud Preview 08:23

Coupon to My Other Courses Preview 00:20