Articles

MongoDB

MongoDB K8s manifest

Here's a simple manifest to deploy MongoDB with data persistence in microk8s:
MongoDBKubernetes

Mongoose bulkWrite upsert

Here is a code snippet for a bulk update with upsert using Mongoose:
MongoDBMongooseNode.js

Mongoose bulk update upsert

MongoDB's upsert option enables the creation of a new document if the query of an update operationdoesn't match any existing document. Basically, an update command with upsert creates a document if it does notexist already, and update it otherwise.
MongooseMongoDBTutorials

Mongoose query documents with matching array element

Mongoose query documents with matching array element thumbnail
As a NoSQL database, MongoDB can store arrays as fields of a document. This article presents how to query such documents by filtering those with arrays that contain a specific value.
MongoDBMongooseTutorials