Photo by Ales Krivec on Unsplash When working with Alpine.js templates, I ran into an issue where only the first child element inside a <template> tag is rendered, leaving subsequent elements mysteriously absent. Understanding the Problem Consider the following code: <template x-if="products.product_id"> <a...
Photo by Trevor Wilson on Unsplash Why Updating Alpine.js State with Direct Reassignment Fails (and How to Fix It) Reactivity is amazing, but when it fails its frustrating. And with that a stupid issue hit me recently because of direct reassignment of a variable that I did. In my defence I was reassigning the property this.formFields...
Photo by NASA on Unsplash TL;DR: Updated project code here: github.com/andyj/svrjs-with-docker How to Use SVR.js to Run Server-Side JavaScript Building on the Basics In my previous post, How to Run SVR.js with Docker Compose, I introduced a simple way to set up SVR.js for serving static files using Docker Compose. Since then, I’ve expanded the...
Photo by Florian Olivo on Unsplash TL;DR: Project code here: github.com/andyj/svrjs-with-docker Why SVR.JS? SVR.JS is a lightweight and efficient web server designed to serve static files effortlessly. It's great for scenarios where you need a quick and reliable solution to host static content without the overhead of traditional web...
Photo by Alec Weir on Unsplash TL;DR: Find the GitHub project here: github.com/andyj/mariadb-connection-pool Why Use a Connection Pool? Database connection pooling critical for your web applications. Without a pool, every database query spins up a new connection which startes eating up your resources! A connection pool keeps a stash of open...
Photo by Brina Blum on Unsplash From a conversation on the Working Code Podcast Discord channel I came across a change between Lucee 5 to Lucee 6, and how variables are scoped and handled, specifically when/if using var in a .cfm template. This post is just the sample code I used to do some digging on how the scoping...
Photo by Adam Birkett on Unsplash Bluesky now has over 10 million users, and I was #56137!
Photo by Nathan Cima on Unsplash Docker on macOS stores its container data in a virtual disk file called Docker.raw. This file is used by Docker's internal virtual machine (VM) and can grow dynamically as more containers and images are created. Over time, even when containers are deleted, Docker.raw can take up substantial disk space. I...
Photo by Gabriel Heinzer on Unsplash If you’re looking to ensure that your website’s content is indexed by search engines as quickly as possible, IndexNow is another tool to add to your toolbelt. Below, is my bash script helped me get started quickly with IndexNow. Afterwards, I’ll break down what each part of the script does and what it does,...
Photo by CHUTTERSNAP on Unsplash I've been having trouble with my andyjarrett.com domain (though not my .co.uk one?) and redirection issues. Sometimes it would affect the browser, sometimes it wouldn't. Well last night was the last time its happening. So this is there I was curl https://www.andyjarrett.com <html> <head><title>307...