0.0.18 • Published 3 years ago

qcobjects-lib-cosmosdb v0.0.18

Weekly downloads
-
License
LGPL-3.0-or-later
Repository
github
Last release
3 years ago

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