Skip to content

sethreidnz/cosmos-db-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cosmos DB Demo

This repository contains a demo using Microsoft's Azure CosmosDB to build a simple ASPNET Core API for updating and creating user profiles.

Getting Started

You need to install the following on your computer:

If you environment is set up correctly you should be able to run the following command on the command line and get the output:

dotnet --version
# 2.0.0

Running the API

NOTE: You need to start the CosmosDB emulator before running the API

To run the server in a few ways:

  • Open the folder in Visual Studio Code and press F5

  • Open the solution in Visual Studio and press F5

  • Open the root folder on the command line and run the following:

    cd server
    dotnet run

    NOTE: you will also need to set the environment variable ASPNETCORE_ENVIRONMENT to Development if you want to run the server from the command line.

Deploy to Azure

You can deploy this directly to azure

NOTE: This will create a App Service Plan and a CosmosDB account

Deploy to Azure

About

A demo of how to use the various cosmos db apis in c#

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages