Developing a Node.js app with DocumentDB using Azure Cosmos DB
Running this sample
Before you can run this sample, you must have the following perquisites:
Clone this repository using
git clone email@example.com:Azure-Samples/azure-cosmos-db-documentdb-nodejs-getting-started.git cosmosdb
Change directories to the repo using
Next, substitute the endpoint and authorization key in
config.jswith your Cosmos DB account's values.
config.endpoint = "~your DocumentDB endpoint here~"; config.authKey = "~your auth key here~";
npm installin a terminal to install required npm modules
node app.jsin a terminal to start your start your node application.
About the code
The code included in this sample is intended to get you quickly started with a Node.js console application that connects to Azure Cosmos DB with the DocumentDB API.