Skip to content

Commit

Permalink
update link
Browse files Browse the repository at this point in the history
  • Loading branch information
biltongza committed Nov 19, 2023
1 parent 0239473 commit 19c6956
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/posts/building-my-own-website-part-ii.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Typically for a SPA you'll have some sort of API that it uses to get or modify r

I just needed a way to produce that file and keep it up to date.

As I wrote about in my [previous post](./building-my-own-website), [Azure Functions](https://azure.microsoft.com/en-us/services/functions/) was a pretty natural choice. It is simply Microsoft's implementation of functions-as-a-service, and it is certainly not the only one out there (GCP has [Cloud Functions](https://cloud.google.com/functions), AWS has [Lambda](https://aws.amazon.com/lambda/), Cloudflare has [Workers](https://workers.cloudflare.com/), to name a few). I'm just sticking with Azure because it's what I know (although I must give credit to [Troy Hunt](https://www.troyhunt.com/serverless-to-the-max-doing-big-things-for-small-dollars-with-cloudflare-workers-and-azure-functions/) for planting the serverless seed in my head in 2018)
As I wrote about in my [previous post](./building-my-own-website-part-i), [Azure Functions](https://azure.microsoft.com/en-us/services/functions/) was a pretty natural choice. It is simply Microsoft's implementation of functions-as-a-service, and it is certainly not the only one out there (GCP has [Cloud Functions](https://cloud.google.com/functions), AWS has [Lambda](https://aws.amazon.com/lambda/), Cloudflare has [Workers](https://workers.cloudflare.com/), to name a few). I'm just sticking with Azure because it's what I know (although I must give credit to [Troy Hunt](https://www.troyhunt.com/serverless-to-the-max-doing-big-things-for-small-dollars-with-cloudflare-workers-and-azure-functions/) for planting the serverless seed in my head in 2018)

I'm making use of a simple timer trigger for my image sync function, with the timer set to trigger on every half-hour. I'm making use of a manifest to determine what to show on the site. It's just a simple JSON file with metadata and relative URLs to images. Every invocation of the function first tries to see if this manifest file exists in a blob storage account. If it does exist, it'll check the last modified time of each image in the manifest and see if it is outdated according to the last modified time in Lightroom (if the manifest does not exist, everything is assumed out of date). If it is out of date, it'll pull a render of the image from Lightroom and store it in the same blob storage account, otherwise the image is skipped and it moves on. If any modifications to the manifest need to be made, a flag is set, and the manifest is modified in memory. At the end of all these checks, it will check the flag, and store the updated manifest back into the blob storage account.

Expand Down

0 comments on commit 19c6956

Please sign in to comment.