Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Open a connection to the Cosmos DB database
try {
// Open a reference to the database
const dbResponse = await cosmosClient.databases.createIfNotExists({
id: databaseId
var database = dbResponse.database;
// ... (we will add more code here!)
} catch (error) {
res.status(500).send("Error with database query: " + error.body);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.