2ac677b7db
* Change feed support * typos, PR feedback, fix StartTime test coverage * add retries to flaky test * Adds jsdoc, changes response type, and adjusts feed options * Add change feed sample * PR feedback * pr feedback * remove partitionkeyrange support and dedupe PK * Fix session test |
||
---|---|---|
.. | ||
ChangeFeed | ||
ContainerManagement | ||
DatabaseManagement | ||
IndexManagement | ||
ItemManagement | ||
MultiRegionWrite | ||
ServerSideScripts | ||
Shared | ||
TodoApp | ||
UserManagement | ||
readme.md |
readme.md
Introduction
These samples demonstrate how to use the Node.js SDK to interact with the Azure Cosmos DB service
Running the samples
Quick steps:
- Start the Cosmos DB emulator
cd
into a given sample's directorynpm start
Debugging
These samples were built using VS Code and includes a .vscode/launch.json
. However, you do not need anything other than Node.js to run these samples. Just run the app.js in your choice of editor or terminal.
To debug in VS Code, just use the "Debug File" option, and start it in the sample's app.js of your choice. (For the TodoApp, you need to start from bin/www
)
Cosmos Account
Before you can run any of the samples you do need an active Azure Cosmos DB account or the emulator. Head over to How to create a Azure Cosmos DB database account and see how to setup your account. Check out the emulator (windows only at the moment) here.
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.
-
TodoApp - Quick and simple todo app.
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.