Description
In this course, you will :
- Create the backend for your web and mobile applications.
- Utilize current JavaScript features (ES6, ES7).
- Carry out CRUD operations.
- Handle and log errors correctly.
- Unit and integration tests should be written.
- Use test-driven development (TDD).
- MongoDB is a database that allows you to store and retrieve complex data.
- Put authentication and authorization in place.
- Deploy your Node apps to the production environment.
- Use best practises to create apps that are fast, scalable, and secure.
Syllabus :
1. Node Module System
- Global Object
- Modules
- Creating a Module
- Loading a Module
- Module Wrapper Function
- Path Module
- OS Module
- File System Module
- Events Module
- Event Arguments
- Extending Event Emitter
- HTTP Module
2. Node Package Manager
- Package.json
- Installing a Node Package
- Using a Package
- Package Dependencies
- NPM Packages and Source Control
- Semantic Versioning
- Listing the Installed Packages
- Viewing Registry Info for a Package
- Installing a Specific Version of a Package
- Updating Local Packages
- DevDependencies
- Uninstalling a Package
- Working with Global Packages
- Publishing a Package
- Updating a Published Package
3. Building RESTful API's Using Express
- RESTful Services
- Introducing Express
- Building Your First Web Server
- Nodemon
- Environment Variables
- Route Parameters
- Handling HTTP GET Requests
- Handling HTTP POST Requests
- Calling Endpoints Using Postman
- Input Validation
- Handling HTTP PUT Requests
- Handling HTTP Delete Requests
- Project- Build the Genres API
4. Express- Advanced Topics
- MIddleware
- Creating Custom Middleware
- Built-In Middleware
- Third-party Middleware
- Environments
- Configuration
- Debugging
- Templating Engines
- Database Integration
- Authentication
- Structuring Express Applications
- Project- Restructure the App
5. Asynchronous JavaScript
- Synchronous Vs. Asynchronous Code
- Patterns For Dealing With Asynchronous Code
- Callbacks
- Callback Hell
- Named Functions to Rescue
- Promises
- Replacing Callbacks with Promises
- Consuming Promises
- Creating Settled Promises
- Running Parallel Promises
- Async and Await
6. CRUD Operations Using MongoDB
- Introducing MongoDB
- Installing MongoDB on Mac
- Installing MongoDB on Windows
- Connecting to MongoDB
- Schemas
- Models
- Saving a Document
- Querying Documents
- Comparison Query Operators
- Logical Query Operators
- Regular Expressions
- Counting
- Pagination
- Exercise
- Updating Documents- Query First
- Updating a Document- Update First
- Removing Documents
7. Mongoose - Data Validation
- Validation
- Built-In Validators
- Custom Validators
- Async Validators
- Validation Errors
- SchemaType Options
- Project- Add Persistence to Genres API
- Project- Build the Customers API
- Restructuring the Project
8. Mongoose- Modeling Relationships Between Connected Data
- Modelling Relationships
- Referencing Documents
- Population
- Embedding Documents
- Using an Array of Sub-documents
- Project- Build the Movies API
- Project- Build the Rentals API
- Transactions
- ObjectID
- Validating Object ID's
- A Better Implementation
9. Authentication and Authorization
- Creating the User Model
- Registering Users
- Using Lodash
- Hashing Passwords
- Authenticating Users
- Testing the Authentication
- JSON Web Tokens
- Generating Authentication Tokens
- Storing Secrets in Environment Variables
- Setting Response Headers
- Encapsulating Logic in Mongoose Models
- Authorization Middleware
- Protecting Routes
- Getting the Current User
- Logging Out Users
- Role Based Authorization
- Testing the Authorization
10. Handling and Logging Errors
- Handling Rejected Promises
- Express Error Middleware
- Removing Try_Catch docs
- Express Async Errors
- Logging Errors
- Logging to MongoDB
- Uncaught Exceptions
- Unhandled Promise Rejections
- Error Handling Recap
- Refactoring Index.js- Extracting Routes
- Extracting the DB Logic
- Logging
- Extracting the Config Logic
- Extracting the Validation Logic
- Showing Unhandled Exceptions on the Console
11. Unit Testing
- What is Automated Testing?
- Benefits of Automated Testing
- Types of Tests
- Test Pyramid
- Tooling
- Writing Your First Unit Test
- Testing Numbers
- Grouping Tests
- Refactoring with Confidence
- Testing Strings
- Testing Arrays
- Testing Objects
- Testing Exceptions
- Continually Running Tests
- Exercise- Testing the FizzBuzz
- Creating Simple Mock Functions
- Interaction Testing
- Jest Mock Functions
- What to Unit Test
12. Integration Testing
- Preparing the App
- Setting Up the Test DB
- Your First Integration Test
- Populating the Test DB
- Testing Routes with Parameters
- Validating Object ID's
- Refactoring with Confidence
- Testing the Authorization
- Testing Invalid Inputs
- Testing the Happy Paths
- Writing Clean Tests
- Testing the Auth Middleware
- Unit Testing the Auth Middleware
- Code Coverage
13. Test-driven Development
- What is Test-driven Development?
- Implementing the Returns
- Test Cases
- Populating the Database
- Testing the Authorization
- Testing the Input
- Refactoring Tests
- Looking Up an Object
- Testing if Rental Processed
- Testing the Valid Request
- Testing the Return Date
- Testing the Rental Fee
- Testing the Movie Stock
- Testing the Response
- Refactoring the Validation Logic
- Mongoose Static Methods
- Refactoring the Domain Logic
14. Deployment
- Preparing the App for Production
- Getting Started With Heroku
- Preparing the App for Deployment
- Adding the Code to a Git Repository
- Deploying to Heroku
- Viewing Logs
- Setting Environment Variables
- MongoDB in the Cloud