azure-cosmosdb-node/samples
Christopher Anderson 15cf138373
Release 1.14.5 (#246)
2018-07-09 18:00:25 -07:00
..
CollectionManagement made edits and changed URL links in comments 2017-12-15 16:27:11 -08:00
DatabaseManagement made edits and changed URL links in comments 2017-12-15 16:27:11 -08:00
DocumentManagement Version 1.14.4 release 2018-05-03 15:21:04 -07:00
IndexManagement - Changed all occurances of "DocumentDB" to "Cosmos DB" in comments 2017-12-13 18:23:59 -08:00
Partitioning made edits and changed URL links in comments 2017-12-15 16:27:11 -08:00
ServerSideScripts made edits and changed URL links in comments 2017-12-15 16:27:11 -08:00
Shared Security fixes in samples and source/base.js 2017-11-15 17:10:56 -08:00
UserManagement - Changed all occurances of "DocumentDB" to "Cosmos DB" in comments 2017-12-13 18:23:59 -08:00
DocumentDB.Samples.sln Added user management 2017-08-16 22:56:41 +05:30
readme.md Release 1.14.5 (#246) 2018-07-09 18:00:25 -07:00

readme.md

Introduction

These samples demonstrate how to use the Node.js SDK to interact with the Azure Cosmos DB service

Building the sample

These samples were built using the Node.js Tools for Visual Studio and include *njsproj files accordingly. However, you do not need Visual Studio to run these samples. Just ignore the nsjprof files if you wish, and open the app.js in your choice of editor such as Visual Studio Code, or even a text editor such Sublime. The choice is yours!

Before you can run any of the samples you do need an active Azure Cosmos DB account. So head over to How to create a Azure Cosmos DB database account and see how to setup your account.

Once you have your Azure Cosmos DB account setup, edit the file "Shared/config.js" to use your account's endpoint and authKey.

You can then run these files using Visual Studio if you are using it, or by simply running node app.js

Description

Azure Cosmos DB is a fully managed, scalable, query-able, schema free JSON document database service built for modern applications and delivered to you by Microsoft.

These samples demonstrate how to use the Client SDKs to interact with the service.

  • CollectionManagement - CRUD operations on DocumentCollection resources.

  • DatabaseManagent - CRUD operations on Database resources.

  • DocumentManagement - CRUD operations on Document resources.

  • IndexManagement - shows samples on how to customize the Indexing Policy for a Collection should you need to.

  • Partitioning - shows samples on using the provided hashPartitionResolver and rangePartitionResolver classes, and how to implement custom resolvers.

  • ServerSideScripts - shows how to create, and execute, server-side stored procedures, triggers and user-defined functions.

After walking through these samples you should have a good idea of how to get going and how to make use of the various Azure Cosmos DB APIs.

There are step-by-step tutorials and more documentation on the Azure Cosmos DB documentation page so head over about this NoSQL document database.

More information

For more information on this database service, please refer to the Azure Cosmos DB service page.