Edi Wang

Microsoft MVP for Azure

All Posts

Deploy to Azure Static Web App from Local Machine without GitHub Action

When creating Azure Static Web App in Azure portal. The deployment options did not provide clear instructions for how to deploy without creating a project and CI/CD pipeline on GitHub or Azure DevOps. Many times, we just want to deploy a simple one-time project from a local computer. Let's see how to do this. …
Azure

Make NPM Install with Legacy Peer Deps in Azure Static Web Apps Builds

After upgrading a JS library, GitHub Action for build and deploy Azure Static Web Apps blows up sky high. According to the error message. npm install command need to run with --legacy-peer-deps. However, there is no step of npm install in Azure Static Web Apps's yml file. How can we tell npm to use legacy peer deps? …
Azure NPM

Move CRON Expression from Hard Code to Configuration in Azure Function App

When creating Azure Function with Timer trigger, we usually write CRON expression in our function code. But when you need to dynamically adjust your timer based on business needs, you will have to update your code and redeploy the function. Let's see how we can remove the hard code CRON expression and put it into configuration that we can easily update on the Azure Portal without redeploy the code …
Azure Azure Function

System Fonts on Azure App Service for Linux

In early this year, I am upgrading my Captcha library, the code that renders text on images blow up when running under Azure App Service for Linux. I can tell from the error message that the font I am using is not installed on Azure App Service's hosting machine. To fix this, I need to find out what fonts are there in Azure App Service for Linux. Let's see how to do it. …
Azure Linux

Get Transcription from Twitter Space using Azure Speech Service

Although Twitter Space audio recording has it's own transcription, it is sometimes incorrectly recognizing wrong languages. For example, English content are producing Chinese transcription (not translation), and not even the English transcription make sense. Let's see how we can get a correct transcription using Azure. …
Azure AI

How to Add Parameters for 'npm install' in Azure DevOps

Recently my Azure DevOps build pipeline failed because Azure is using npm 8.x, which will have issue for angular projects when running `npm install`.  This is a known issue which can be solved by using `--legacy-peer-deps` or `--force` for the `npm install` command. However, Azure DevOps's npm task does not take parameters by default. Let's see how we can use these parameters in Azure DevOps. …
Azure DevOps NPM

Adding Azure Cache for Redis in My Elf Project

ASP.NET Core Memory cache has its own limits. It is difficult to scale in a cloud environment with multiple instances. Azure Cache for Redis provides a fully managed distributed cache service for cloud applications. It is built on top of Redis, a popular cache and messaging product. Integrating Redis into cloud applications can improve performance and scalability. …
Azure Redis