Skip to content

Azure Cosmos DB's Graph API provides the graph data model and Gremlin. This tutorial shows how to get started with the Graph (Gremlin) API and the Node.js SDK.

License

Notifications You must be signed in to change notification settings

vivekr20/azure-cosmos-db-graph-nodejs-getting-started

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

services platforms author
cosmos-db
nodejs
arramac

Developing a Node.js app using Azure Cosmos DB

Azure Cosmos DB is a globally distributed multi-model database. One of the supported APIs is the Graph (Gremlin) API, which provides a graph data model with Gremlin query/traversals. This sample shows you how to use the Azure Cosmos DB with the Graph API to store and access data from a Node.js application.

Running this sample

  • Before you can run this sample, you must have the following prerequisites:

  • Then, clone this repository using git clone git@github.com:arramac/azure-cosmosdb-graph-nodejs-getting-started.git

  • Next, substitute the graph endpoint (*.graphs.azure.com) and primary master key in config.js with your Cosmos DB account's values.

  • From a command prompt or shell, run npm install gremlin-secure to resolve dependencies. This is private version of the gremlin module which has added support for SSL and SASL, which are required for Azure Cosmos DB, but not supported by the existing gremlin module (until the changes are accepted and merged into the gremlin module).

  • From a command prompt or shell, run node app.js to run the application.

About the code

The code included in this sample is intended to get you quickly started with a Node.js application that connects to Azure Cosmos DB with the Graph (Gremlin) API.

More information

About

Azure Cosmos DB's Graph API provides the graph data model and Gremlin. This tutorial shows how to get started with the Graph (Gremlin) API and the Node.js SDK.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%