All Categories

  • How to Delete Data from MongoDB with Node.js and Mongoose

    8/11/2020 -
    This blog will show a tutorial about how to delete data from MongoDB by using Node.js with Mongoose. Mongoose is the Object Data Modeling library for MongoDB and Node.js. It provides functions for schema, query building, and more. If you don't use Mongoose to access MongoDB with Node.js, then you can use the MongoDB package for Node.js directly.  Get Start First, initialize a new npm package, we'll create a new package and new file, and add our code for how to insert data to MongoDB. npm init -y Next, let's install the mongoose package, this will be the only package we'll use for this tutorial.  npm install --save mongoose Create an index.js, we'll add our code to this file to connect to MongoDB and insert data to the Database. Connect to the MongoDB Now, the following is a sample code to connect to MongoDB.
    MongoDBNode.jsMongoose
  • How to Insert Data into MongoDB with Node.js and Mongoose

    7/11/2020 -
    This blog will show a tutorial about how to insert data into MongoDB by using Node.js with Mongoose. Mongoose is the Object Data Modeling library for MongoDB and Node.js. It provides functions for schema, query building, and more. If you don't use Mongoose to access MongoDB with Node.js, then you can use the MongoDB package for Node.js directly.  Get Start First, initialize a new npm package, we'll create a new package and new file, and add our code for how to insert data to MongoDB. npm init -y Next, let's install the mongoose package, this will be the only package we'll use for this tutorial.  npm install --save mongoose Create an index.js, we'll add our code to this file to connect to MongoDB and insert data to the Database. Connect to the MongoDB Now, the following is a sample code to connect to MongoDB.
    Node.jsMongooseMongoDB
  • How to Find Record from MongoDB with Node.js and Mongoose

    9/11/2020 -
    This blog will show a tutorial about how to find data into MongoDB by using Node.js with Mongoose. Mongoose is the Object Data Modeling library for MongoDB and Node.js. It provides functions for schema, query building, and more. If you don't use Mongoose to access MongoDB with Node.js, then you can use the MongoDB package for Node.js directly.  Get Start First, initialize a new npm package, we'll create a new package and new file, and add our code for how to insert data to MongoDB. npm init -y Next, let's install the mongoose package, this will be the only package we'll use for this tutorial.  npm install --save mongoose Create an index.js, we'll add our code to this file to connect to MongoDB and insert data to the Database. Connect to the MongoDB Now, the following is a sample code to connect to MongoDB.
    Node.jsMongooseMongoDB
  • How to Update MongoDB Data with Node.js and Mongoose

    8/11/2020 -
    This blog will show a tutorial about how to update data into MongoDB by using Node.js with Mongoose. Mongoose is the Object Data Modeling library for MongoDB and Node.js. It provides functions for schema, query building, and more. If you don't use Mongoose to access MongoDB with Node.js, then you can use the MongoDB package for Node.js directly.  Get Start First, initialize a new npm package, we'll create a new package and new file, and add our code for how to insert data to MongoDB. npm init -y Next, let's install the mongoose package, this will be the only package we'll use for this tutorial.  npm install --save mongoose Create an index.js, we'll add our code to this file to connect to MongoDB and insert data to the Database. Connect to the MongoDB Now, the following is a sample code to connect to MongoDB.
    Node.jsMongoDBMongoose
  • Mongodb 2.6 upgrade

    8/3/2014 -
    how to upgrade mongodb from 2.4 to 2.
    MongoDBMongoose
  • How to Setup MongoDB Text Search with Node.js

    3/20/2016 -
    How to use MongoDB text search MongoDB provide text search function since 2.4, this blog will show how to use mongodb text search. All the example at following is run based on MongoDB version, 3.0.5. Also, I'm using Robomongo (0.8.5) to run all the MongoDB command. I also have code snippet about how to use Mongoose with text search, but I recommend at least use 2.6, seems like 2.4 with Mongoose has some problem. Stop Words, Stemming in MongoDB text search Before jump into how to use MongoDB text search, we need to understand how MongoDB do stop words and stemming. Stop in MongoDB is, let's say you have "I like apple", stop wold will be apple. Stemming is like "cook cooking cooks", so MongoDB text engine will index cook. I like apple, also I enjoy cooking.
    MongoDBMongooseNode.js
  • Code Snippet - How to Find Items by ObjectId with Mongoose

    7/6/2014 -
    Get all records where the Ids contains specfic object Id.
    Mongoose
  • How to Use MongoDB TextSearch by Mongoose

    8/3/2014
    MongooseMongoDBNode.jsC#