Migrating Websites from SvelteKit to Astro, the results
Introduction I have had my eye on Astro for a while. It looked like the perfect fit for the static websites that I manage. But because of the following reasons, I didn’t want to switch: I was/am very satisfied with SvelteKit’s static adapter. There was no support for Astro in Webstorm (my IDE). I didn’t know that the prefetch addon existed. I use something similar in SvelteKit and didn’t want to migrate some sites without that functionality. What changed? Well, since Webstorm 2023.1 there is an Astro plugin. Combine that with some curiosity and my discovery of the prefetch addon and off I went. ...
Docker Nginx vs Nginx Unprivileged and why it matters (a lot)
Introduction This is something that baffled me when I found out. And since the official Nginx docker image is downloaded over a billion times, I think it is very important to get this out. What is going on? So the official Nginx Docker image runs in what is called “privileged mode”. When you run a container in privileged mode you essentially run it as root. This means that the container has access to the complete underlying system. This in contrast to non-privileged mode where the container runs as a random user and group which doesn’t have access to anything but their own container. ...
Urql GraphQL what are exchanges and why their order matters
Introduction So I recently ran into a nasty bug where urql, the GraphQL client I was using, seemed broken. Turned out I messed up the order of my exchanges. And I want to prevent others from making this mistake. :) What are exchanges? Exchanges are basically middleware. For those not really familiar with middleware in this context, middleware is a piece of software which every request goes through. So you could for example have middleware which will add an arbitrary HTTP header to every request. ...
Nodejs graphql-upload Replacement
Introduction Ever since graphql-upload v14, the maintainer has made the controversial decision to force deep imports. This means that you can no longer do this: import {GraphQLUpload} from 'graphql-upload'; Now you have to change that to this: import GraphQLUpload from 'graphql-upload/GraphQLUpload.mjs'; Although this is dubious at best, this seems like a quick fix. It is, except when you use TypeScript. The Proposed “Solutions” Now I’m not going to document all the proposed solutions from the maintainer and the community alike here. I’ve spent quite a few hours trying to fix this myself. I’ve followed this, this, this, that and probably a lot more when I went deep into the rabbit hole. But nothing seemed to work, and even if it did, the “solutions” often meant changing your tsconfig.json to allow JavaScript and **** like that. ...
Why you shouldn't use WordPress
Introduction A lot of people think I hate WordPress, I really don’t. But I hate the way its grossly misused across the web. In this post I’ll briefly talk about what WordPress is, since everybody keeps forgetting it. Why you shouldn’t use it and why this matters. Why this matters Simple, it is used A LOT. According to Kinsta it has a market share of 43%. And to be clear, that is of all websites. That is huge! ...