This repository contains a demo using Microsoft's Azure CosmosDB to build a simple ASPNET Core API for updating and creating user profiles.
You need to install the following on your computer:
- Visual Studio Code or Visual Studio 2017
- .NET Core >= 2 (this packaged with Visual Studio 2017)
- DocumentDB Emulator
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
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
toDevelopment
if you want to run the server from the command line.
You can deploy this directly to azure
NOTE: This will create a App Service Plan and a CosmosDB account