How to CRUD MongoDB using NodeJS and SailsJS Part 4

Introduction Welcome to Part 4 of the multiple-series tutorial, “How to CRUD MongoDB using NodeJS and SailsJS.” In Part 3, you learned how to do a controller configuration for your SailsJs application, and then display your data with a view. Today, you’ll practice how to delete a MongoDB document, as “Delete” is a part of … Continued

Simple Chat App using NodeJS and MongoDB Atlas Part 3

Introduction In the previous article, we show you how to create a MongoDB Atlas free tier, a user for the cluster and configured the network access and added our IP address in the whitelisted IPs. In this section, we will dive into coding the rest of our chat application while interacting with the MongoDB Atlas … Continued

Simple Chat App using NodeJS and MongoDB Atlas Part 1

Introduction This is part one of a tutorial explaining how to create, from scratch, a simple chat app using NodeJS and MongoDB Atlas as its database. Chat apps are valuable for many applications, from interacting on social media to providing customer service. NodeJS is a powerful open source program for web app development. As it … Continued

Mongoose Pagination

Introduction Pagination is a process in which a document is divided into discrete pages. In simple words, if we have a document containing a large amount of data, and we wish not to print all of it in once, we divide this data into “pages”. These pages contain data according to the limit specified. In … Continued

Create React App with MongoDB – Part 3 Building the Frontend

Part 3: Building the frontend The backend is ready, let’s build the frontend. Understanding the frontend So before we start writing code for the frontend part, we need to understand, what we are going to build. Our frontend part will contain a button. When clicked on this button, data the details collection will de display … Continued

Create React App with MongoDB – Part 2 Building the Backend

Part 2: Building the backend So we have everything ready. Let’s create the backend. Initiating Open the terminal and create a new folder using the following command. 1mkdir backend Change the current directory to the newly created one. 1cd backend We need the package.json file in this folder. Use the following command. 123456789101112131415npm init -y … Continued

Create React App with MongoDB – Part 1 Setting up the Project

Introduction There are various technologies, frameworks, and libraries available that can be used to create a web application. React is a popular library used for building user-interfaces. React is often combined with MongoDB that serves as the database. Along with Express and Node.js, This is stack for building web applications is known as the MERN … Continued

Mongoose Update

Introduction The update() method in mongoose is used to update the values of a document in a MongoDB collection. This method only updates the very first matching document in the collection. In this article, we will discuss how to use the mongoose update() method. We will write our code in the following route handler. 1router.route("/update").put(function(req, … Continued

Mongoose Query Inside Loop

Introduction Using loops for iteration is one of the most common parts of programming and development. The for loop, while loop and do-while loop are the most commonly used loops in the programming and development world. We can also use them in mongoose too. In this article we’ll discuss how to use a Mongoose query … Continued

Keep in the know!

Subscribe to our emails and we’ll let you know what’s going on at ObjectRocket. We hate spam and make it easy to unsubscribe.