Here's what I came up with as a solution to the Azure Resume Challenge
View it live here
Before going through these steps you’ll need to have an Azure account. If you don’t have one you can setup a free trial account at https://azure.microsoft.com/free. Let’s walk through each of these steps.
- GitHub account
- Azure account
- Azure CLI
- .NET Core 3.1 LTS
- Azure Functions Core Tools
- Visual Studio Code
- Visual Code Extensions
- Full solution
The front-end is a static site with HTML, CSS, and JavaScript. It's static and has a visitor counter. The visitor counter data fetched via an API call to an Azure Function.
The back-end is an HTTP triggered Azure Functions with Cosmos DB input and output binding. The Function is triggered, it retrieves the CosmosDB item, add +1 to it, and saves it and returns its value to the caller.
- This is how you can deploy a blob storage static site with GitHub actions. Used in frontend.main.yml.
Powered by Microsoft Azure
Visitor Counter Badge is a simple open-source utility you can use to display the number of visitors on a web page, repository, or profile. Every request to render the visitor count badge invokes an HTTP-triggered Azure function that dynamically generates an SVG image that you can apply on a web page, profile page, or repository.
If you are further interested in learning the internals of this service, please read the Visitor Counter Badge article by Rahul Rai on [https://thecloudblog.net/lab/serverless-visitor-counter-badge-with-azure-functions/]