How to Add Instance Methods with Mongoose

Introduction If you’re using the popular Schema-Model based library Mongoose to interact with MongoJS from NodeJS then this article will provide you about the basics of instance methods. If you don’t know what an instance method is, we’ll show you, and then you’ll quickly find ways to utilize this functionality because it comes in extremely … Continued

How to Delete Documents with Mongoose

Introduction If you’re using the popular Schema/Model based library Mongoose to interact with MongoJS from NodeJS then this article will help you with a variety of options to delete documents. Whether you need to delete all documents in a collection, a single document by id, or delete documents that match a specific condition this tutorial … Continued

How to Connect to Mongo using Mongoose

Introduction If you are considering or already using the npm module Mongoose as your driver to interact with MongoDB the first thing you’ll need to do in your Javascript is to setup the connection between Mongoose and your MongoDB service. In this article we take you step-by-step through how to establish and verify the connection … Continued

How to do a One-to-Many Join using Mongoose

Introduction If you are considering or already using the npm module Mongoose to handle your MongoDB interactions at some point you’ll probably need to know how to perform a join that has a one-to-many relationship. One-to-many joins are an extremely common common relationship. An example of a one-to-many relationship would be that one user can … Continued

How to Join Collections using Mongoose

Introduction If you are considering or already using the npm module Mongoose to handle your MongoDB interactions at some point you’ll probably need to know how to join two collections. If you’re unfamiliar with the concept of joins, a join would be like if you had a collection of Posts and each post had a … Continued

How to Setup a NodeJS App with MongoDB using Mongoose

Introduction NoSQL databases and running your app’s backend with Javascript have both become increasingly popular. In this tutorial we will show you how to use NodeJS to connect with MongoDB using the Mongoose library to setup the backend for a simple web application. If you’re unfamiliar with these technologies, MongoDB is a NoSQL database technology … Continued

The Mongoose Cheat Sheet

Introduction If you’re looking to use a MongoDB database with your web application running on NodeJS you might be looking at which npm libraries which will allow you to easily interact with MongoDB. Mongoose and MongoJS are the two top choices for developers in this scenario. In this article we’ll give a quick cheat sheet … 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.