qcobjects-lib-cosmosdb

QCObjects Lib for work with Microsoft Cosmosdb Database.

Usage no npm install needed!

<script type="module">
  import qcobjectsLibCosmosdb from 'https://cdn.skypack.dev/qcobjects-lib-cosmosdb';
</script>

README

QCObjects Lib Cosmosdb

QCObjects Lib for work with Microsoft Cosmosdb Database.

Instructions

  1. Install this dependency in your project using npm
npm i --save qcobjects-lib-cosmosdb
  1. In your config.json file, create the following settings
{
  "CosmosDB":{
    "endpoint": "$ENV(COSMOSDB_ENDPOINT)",
    "key": "$ENV(COSMOSDB_API_KEY)",
    "database": "$ENV(COSMOSDB_DATABASE)",
    "userAgentSuffix": "QCObjectsCosmosDBAPIClient",
    "partitionKey": ["$ENV(COSMOSDB_PARTITION_KEY)"]
  }
}

Above settings will bring the API Key values from the following environment variables:

COSMOSDB_ENDPOINT COSMOSDB_API_KEY COSMOSDB_DATABASE COSMOSDB_PARTITION_KEY

Learn more about Accessing Microsoft CosmosDb in the official Microsoft Documentation website

  1. Test the integration
npm test
  1. Start the QCObjects HTTP2 Server
qcobjects-server

If you haven't installed QCObjects before, learn more about Installing QCObjects here