Skip to content

sapmentors/cds-nosql

Repository files navigation

monorepo for re>≡CAP Hackathon

cosmos-db

contains the culprit :)

min-sample

as the name suggest, a minimal sample from the Azure Docs on how to connect and work with Cosmos NoSQL via vanilla Node.js

get started

$> cd cosmos-db
$> npm i
$> npm test

cosmos-db/test/**/* contains a test setup that runs locally with SQLite.
Obviously a Cosmos DB connect needs to be implemented first before the tests can run with bespoken DB.
When that is achieved, change the cds section in cosmos-db/test/beershop/package.json from

"cds": {
  "requires": {
      "db": {
        "kind": "sql"
    }
  }
}

to

"cds": {
  "requires": {
      "db": {
        "kind": "cosmos-nosql"
    }
  }
}

Cosmos samples

Point operations

Creating, deleting, upserting, updating, querying documents

Bulk operations

Bulk operations

Basics – creating database/container, AAD auth

Cosmos UI for the hackathon databases

Open cosmos.azure.com (make sure that you are not signed in - there should be a "Signin" button and a link allowing to login via connection string

Use this connection string AccountEndpoint=https://hackathon-recap.documents.azure.com:443/;AccountKey=90NT3CKZPVTGsP3yaa1Khb2ur5rJCUwWZku0MxCK7eC8DQTTzugAmNnsqAHR0QZsDkEgRKBmg2v0ACDbKpvJoQ==;

About

Cosmos DB NoSQL adapter for CAP (Node.js)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •