Cosmos DB is a globally-distributed, multi-model database service on Microsoft Azure. Cosmos DB provides database services like SQL API, MongoDB API, Cassandra, Gremlin for storing NoSQL data.
We can create a Cosmos DB account to create a database and perform Read/Write operations on these databases using various SDKs like .NET, .NET Core, Node.js, JAVA etc. If you are working on theJavaScript stack for building isomorphic apps using Node.js and other JavaScript frameworks like Angular, Vue.js or libraries like React.js, then you will mostly prefer to use MongoDB database for storing data.
We can create a Cosmos DB account to create a database and perform Read/Write operations on these databases using various SDKs like .NET, .NET Core, Node.js, JAVA etc. If you are working on theJavaScript stack for building isomorphic apps using Node.js and other JavaScript frameworks like Angular, Vue.js or libraries like React.js, then you will mostly prefer to use MongoDB database for storing data.
Most of the isomorphic apps those which are using MongoDB database, uses Mongoose framework to perform CRUD operations on the MongoDB Database. On Microsoft Azure, if you are using MongoDB API database service of Cosmos DB to store data, there is a support available for Mongoose framework. This provides a similar coding experience of using MongoDB in on-premise applications.
In this article, we will see how to access Azure Cosmos DB for MongoDB API using Node.js, Express application. Figure 1 explains the application structure