Contains a simple REST API to insert the date time stamp to an Azure Cosmos DB.
The easiest way to deploy and run this application is via the deployment options documented in the app-deploy GitHub repository. Follow the instructions in the Readme.md file.
For local development/debugging, follow the option mentioned below:
-
Before you can run this application, you must have the following prerequisites:
- .NET Core SDK 3.1 or higher
- An active Azure Cosmos account - If you don't have an account, refer to the Create a database account article
-
Clone this repository using your Git command line, or download the zip file.
-
Go to the location of the app.csproj in your command line prompt.
-
Run
dotnet build
to restore packages and build the project. -
Retrieve the URI and PRIMARY KEY (or SECONDARY KEY) values from the Keys blade of your Azure Cosmos account in the Azure portal. For more information on obtaining endpoint & keys for your Azure Cosmos account refer to View, copy, and regenerate access keys and passwords
-
In the appsettings.json file, located in the project root, find Account and Key and replace the placeholder values with the values obtained for your account.
-
You can now run and debug the application locally by running
dotnet run
and browsing the Url provided by the .NET Core command line.