Demo repository to demonstrate Azure Serverless solutions, which demonstrate how to leverage simple application and then extend it with the use of serverless.
The demo solution is built with 3 parts in mind:
Each of them represents functionalities:
- Core - for common libraries and models to be used by functions and GUI
- Func - Azure Functions code for demonstrating different functionalities.
- Web - code for web user interface to be able to execute demo scenarios
In order to run the project locally you will need to have .NET 6 installed and configured runtime for running Azure Functions. Follow the instructions here how to set it up.
You can pick whatever tool you fit appropriately. We do recommend Visual Studio or Visual Studio Code.
Open solution AzureServelessDemo.Web.sln in tool of your choice to see the code. In order to run it locally, you will need to setup environment variables in:
- AzureServerlessDemo.Functions:
- SendEmail
- SendGridApiKey - key for SendGrid service, which will be used for sending emails
- default-emails - emails separated with ;
- BetterWorkflow
- SendGridApiKey - key for SendGrid service, which will be used for sending emails
- default-emails - emails separated with ;
- AzureWebJobsStorage - connection string for Azure Storage Account (or leave UseDevelopmentStorage=true for local development)
- TighterIntegrationWorkflow:
- EventGridNotificationEndpoint - endpoint url to handle notification for this scenario
- EventGridKey - key to authenticate with Azure Event Grid
- SendEmail
- AzureServerlessDemo.Web:
- StorageOptions__ConnectionString - connection string to Azure Storage or local development storage UseDevelopmentStorage=true - check appsettings.json as well for additional requirements:
- FunctionURL - url pointing to the base URL for Azure Function
- SimpleWorkflowUrl - url pointing to workflow to execute simple scenarios
- BetterWorkflowUrl - url pointing to workflow to execute showcase, how to do better scenario based on simple scenario
- TighterWorkflowUrl - url pointing to workflow to execute scenario with tighter integration with Azure services
- Azure__SignalR__ConnectionString - Azure SignalR connection string for realtime updates
When you have that configured, you can run web project and functions project separately to see the execution and GUI respectively.
How to run web project --> described here. How to run functions project --> described here.
In the application itself (for the presentation and for management) I used:
- HTMX for accessing modern browser features and helpers from Khalid Abuhmed
- Bootstrap 5 for CSS framework for GUI