A complete sample To Do application that demonstrates how to build an Azure solution using C#, Azure SQL for storage, and Azure Monitor for monitoring and logging.
Here's the web frontend of this To Do application:
This application is comprised of the following Azure resources:
- Azure App Services - To host the To Do app website and API.
- Azure SQL - To store the To Do data in a database.
- Azure Monitor - A cloud instrumentation service to help you monitor your application.
To run this project, you first need to setup your local development environment and get the code.
NOTE: Support for GitHub Codespaces and VS Code Remote Containers (DevContainers) is coming soon.
The following prerequisites are required to use this application. Please ensure that you have them all installed locally.
- Azure Developer CLI
- Windows:
powershell -c "Set-ExecutionPolicy Bypass Process -Force; irm 'https://aka.ms/install-azd.ps1' | iex"
- Linux/MacOS:
curl -fsSL https://aka.ms/install-azd.sh | bash
- Windows:
- Azure CLI (2.38.0+)
- .NET SDK 6.0 - for the API backend
- Node.js with npm (16.13.1+) - for the Web frontend
- Git (2.36.1+)
You will need an empty folder on your computer to house the project files.
-
Open your favorite terminal, create a new folder, and set your current directory to that newly created folder.
mkdir {your-unique-project-folder-name} cd {your-unique-project-folder-name}
The fastest possible way for you to get this app up and running on Azure is to use the az dev up command.
The az dev up command will:
- Provision all the Azure resources required by this application
- Deploy the code you need to run the application
Run the following command to provision, build, and deploy this application to Azure in a single step.
az dev up --template todo-csharp-sqlNOTE: This may take a while to complete as it performs both the
az dev provision(creates Azure services) andaz dev deploy(deploys code) steps.
This will print a URL to the To Do API application and a URL to the To Do web application. Click the web application URL to launch the To Do app.
Click the Azure Portal link to view resources provisioned.
Run the following command to get a local copy of this repository:
az dev init --template todo-csharp-sqlBefore you can run this application, you will need to provision your resources to Azure.
Run the following command to provision your Azure resources.
az dev provisionRun the following command to deploy the application to Azure:
az dev deployTo help with monitoring applications, the Azure Dev CLI provides a monitor command to help you get to the various Application Insights dashboards.
Run the following command to open the "Overview" dashboard:
az dev monitor --overviewRun the following command to open the "Live Metrics" dashboard:
az dev monitor --liveRun the following command to open the "Logs" dashboard:
az dev monitor --logsRun the following command to delete the application from your Azure Subscription.
az dev downRun the following command to remove the Azure Dev CLI extension:
az extension remove --name azure-devComing soon...
Coming soon...
