Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
MongoDb used with NodeJS .
Rating: 4.4 out of 5(6 ratings)
736 students

MongoDb used with NodeJS .

Here you'll learn how to connect an Express App with MongoDB
Created byPaolo Capra
Last updated 5/2025
English

What you'll learn

  • Understading the basic usage of MongoDB.
  • Understanding how to integrate MongoDB with NodeJS.
  • Key changes from Pure MongoDB sintax to MongoDB used in NodeJS.
  • NodeJS, ExpressJS , general backend knowledge.

Course content

1 section11 lectures58m total length
  • What are MongoDB drivers.5:31

    This Tutorial is meant as a continuation of another tutorial of mine which is called MongoDB Introductory Course

  • How to connect MongoDB to Express.6:41

    Learn to connect a node.js express app to mongodb with the mongodb client, exporting connect and get db functions. Connect to localhost:27017 and the employee database.

  • How to interact with MongoDB with the Express routes.6:41

    Interact with MongoDB through express routes by selecting a collection, sorting results, iterating with forEach or converting to an array, and replying with status 200 or 500.

  • How to fetch one single document.6:43

    Fetch a single document by appending an id to the express route, obtain it from request.params.id, validate with ObjectId.isValid, and handle errors while querying MongoDB.

  • What is Postman.3:31

    Discover how postman tests api endpoints, sends get requests to localhost, saves requests in collections, and handles post, patch, and delete methods for mongo node apps using employee data.

  • Post request with Postman.5:04

    Create and test a post request with postman, parse json bodies with express.json, insert data into MongoDB, and return a 201 json response.

  • DELETE requests with Postman2:17

    Explore delete requests in a Node.js and MongoDB setup using Postman, validating the id, deleting the document at employee/:id, and confirming with a null retrieval.

  • PATCH requests with Postman.5:24

    Learn how to use patch requests with Postman to update a single employee in MongoDB, validating the object id and applying updates from the request body with the set method.

  • How to create a pagination.5:04

    Learn to implement pagination in a Node.js API with MongoDB by using a page query param, defaulting to zero, and applying skip and limit for per-page results.

  • Improves queries using indexes.4:36

    Learn how to enhance MongoDB query performance with indexes, create and manage indexes, inspect explain execution stats, and understand index trade-offs.

  • MongoDB Atlas.7:21

    Learn how to switch from localhost to MongoDB Atlas, set up a cloud database with a free plan, configure authentication and network access, and connect using a username and password.

Requirements

  • Knowledge of NodeJS
  • Knowledge of ExpressJS
  • Knowledge of MongoDB Compass and MongoDB shell.

Description

This course is the second part of a comprehensive tutorial series on MongoDB, focusing specifically on integrating MongoDB with Node.js and Express. While the first part covered the fundamentals of MongoDB, including core commands, data modeling, CRUD operations, indexing, and aggregation, this second module shifts attention toward building real-world applications using MongoDB within a backend environment.

The course starts with an introduction to Node.js and Express, laying the foundation for building RESTful APIs. It then moves on to connecting a Node.js application to a MongoDB database using the official MongoDB Node.js driver and Mongoose, a popular ODM (Object Data Modeling) library. Students learn how to structure their applications, manage routes, create models, and perform all major database operations (Create, Read, Update, Delete) directly from an Express-based backend.

Throughout the course, practical examples and projects are used to reinforce the material. Topics such as middleware usage, error handling, environment variables, and async/await patterns are also introduced to help learners write clean, maintainable, and scalable code.

By the end of this course, students will have a solid understanding of how to use MongoDB in a full-stack JavaScript application. They will be able to build functional APIs, connect them to a MongoDB database, and perform efficient data operations. This course is ideal for developers who have basic knowledge of MongoDB and are looking to take the next step by applying it in a server-side JavaScript context.

Who this course is for:

  • Backend/Fullstack developers.