Today Is an Important Day

Today Is an Important Day

Over the past few years, I've read a lot about Azure Static Web Apps, but I've never had a reason to create one. Mainly because I am a back-end developer but also because I haven't had a need for a web site in recent years. Well today that all changed.

I'd like to say my recent Azure experience has been excellent. Unfortunately, I can't. It started off on the wrong foot as my personal Microsoft account is associated with the tenant of a company from a former contract assignment. Microsoft support has been unexpectedly wonderful and very responsive assisting me on circumventing the situation to keep me moving. Thank you, Microsoft - Kashawn you've been amazing. As glorious as that has all been, it's delayed everything by at least a week and there may be more to be done.

The next hurdle I encountered was getting the build to succeed using GitHub Actions. The Azure extension in VS Code allows you to create a Static Web App. Part of the process is to automatically create the GitHub Actions workflow. Which is awesome. What isn't awesome is a cryptic error message in the build log:

Article content
GitHub Actions Error Message

The web site is a plain vanilla web site. No frameworks. Just plain HTML, CSS and JavaScript. Vanilla isn't exactly the hottest trend for web development frameworks lately. There is very little information or tutorials for deploying such a boring, simple web site to Azure Static Web Apps. "Could not detect any platform?" Of course not, there is no "platform" to detect. "Could not detect the language from repo?" What language? English?

Multiple internet searches came up empty. Even Stack Overflow didn't cough up a solution. After digging through the build log, buried in a flurry of warning and error messages is a tiny detail: failed to find default file. Oh, the default file MUST be named index.html or Index.html.

I've been around long enough to know, yes, it can be that simple. After renaming index.htm to index.html and pushing the commit, like magic, a successful deployment. Learning new things can be frustrating at times. Ask me how I know. I guess assuming the behavior of IIS allowing multiple default file names applies to Azure Static Web Apps is a really poor plan.

The backend API is an Azure Functions App with a single endpoint. The API will expand a little bit, however, the site is pretty basic at this time. A few changes to get the front-end to work correctly with the API and get the API communicating with the backend database and everything magically started working.

You might be wondering by now why today is so important? Deploying a Static Web App in of itself is inconsequential. Today is important because I've just published the first 3 web pages of the web site for my new business. The business launch date is getting closer, and I can't wait.

See you at the races!

To view or add a comment, sign in

More articles by Jon Krupa

  • Radio Buttons in .NET MAUI

    One of my many side projects is porting an old utility application that currently uses Windows Forms to .NET MAUI.

  • Wait, I Don't Have to Await?

    One thing I see quite often in asynchronous C# code is unnecessary awaits. I'm not sure if it is a lack of…

  • Why Am I So Stressed?

    Over my holiday vacation I came to the realization I am stressed out. I am over stressed and I didn't realize it until…

    3 Comments
  • Structured Logging != String Interpolation

    Structured logging has been around for a while now in .NET.

  • Being Aware of .NET Performance Issues

    I recently performed a code review trying to match contacts between two different systems to build a single list of…

  • .NET MAUI Is Not the Holy Grail of UI Frameworks

    .NET MAUI is marketed as the multi-platform UI framework where developers can create applications and deploy to mobile…

    14 Comments
  • Incremental Cost Analysis - Do it now or do it later?

    As a software developer turned business systems analyst back in the early 2000s I was often tasked with specification…

  • What Can A Weed Trimmer Teach Me

    I bought a weed trimmer 4 years ago. I immediately took off the trimmer head and put on a brush blade.

  • Prevent Remote Desktop From Freezing

    The biggest headache with working from home has been needing to connect to a virtual computer (VM) that resides in the…

    1 Comment
  • Are You Overlooking Great Candidates?

    If you are in a hiring role, you may be overlooking great candidates and not even realizing it. I look into two common…

Insights from the community

Others also viewed

Explore topics