{k} Knappi coding Articles
  • Three squared sheets of paper lie on a table. They have different colors but show all the same image:
A cloud symbol connected to a home symbol and a triangle symbol.
    Mar 2, 2025

    Multi stage setup with Terraform

    Series: Terraform - placeruler.knappi.org

    Today we are going to extract a Terraform module from our setup, in order to have multiple stages, like development, staging and production.

  • The image shows a scenic and cloudy landscape with a waterfall containing a hinted AWS Lambda 
logo, a small house, and a wooden signpost. The signs on the signpost are labeled "/*",
pointing to the house, and "/api/*", pointing to the waterfall.
    Feb 16, 2025

    Using CloudFront with Lambda and S3

    Series: Terraform - placeruler.knappi.org

    Another post in the placeruler series: This time, we are going to use Cloudfront as a router to deliver a static site in addition to the image-generating Lambda

  • A man, looking desperate and sad, face in his palms. Two dark thought bubble emerge
from the head, each showing the letters ABC in a different font. Lightnings in the background.
    Feb 2, 2025

    Fun with fonts and Sharp in Lambda

    Series: Terraform - placeruler.knappi.org

    The last post showed how to generate images in AWS Lambda using JavaScript and Sharp. We can create an SVG image, we can convert it to PNG. We can do that in AWS Lambda or in local development. Now we want to embed some text. And we want to make sure that the correct font is used in all those environments. This is going to be fun...

  • A woman is drawing a placeholder image on a dark green chalkboard
    Jan 19, 2025

    Creating a placeholder image

    Series: Terraform - placeruler.knappi.org

    After some posts about Terraform and infrastructure as code, this post is a little side-journey into the land of SVG. A description of the image creation algorithm of placeruler.knappi.org

  • Robot with Terraform icon sitting in front of a computer with two screens. One showing an AWS logo on a dark background, one showing a Hetzner logo on a light background.
    Jan 5, 2025

    Combining Hetzner DNS and AWS with Terraform

    Series: Terraform - placeruler.knappi.org

    I have my domains hosted by Hetzner, but my placeruler project is hosted on AWS. This post is about setting up SSL certificates and DNS records in a multi-cloud fashion, using Terraform. For me that gain is that I could save the cost of Route53. But who knows what else is possible by using Terraform as glue between the clouds.

  • Mountain of the AWS Lambda shape, rising from a clouds
    Dec 22, 2024

    Caching AWS Lambda with CloudFront

    Series: Terraform - placeruler.knappi.org

    In this post, I will show how to add CloudFront to the Lambda function created in the last posts. This will allow us to cache the response and reduce the costs of the Lambda function.

  • A scenic view of mountain cliff, a waterfall running down the cliff, an AWS Lambda logo shaped group of trees on the cliff.
    Dec 15, 2024

    Streaming AWS Lambda with Node.js

    Series: Terraform - placeruler.knappi.org

    AWS Lambda has a relatively new feature: Response streaming. This allows you to begin sending the response before the complete response is computed. How does it work? Does it work? This is what I explore in this post.

  • A placeholder image with a star in the middle and a grid of lines with labels indicating the distance to the border. 720x360 is written in large letters in the center of the image.
    Dec 8, 2024

    Deploying a HTTP accessible AWS Lambda via Terraform

    Series: Terraform - placeruler.knappi.org

    In order to learn Terraform, I decided to build a small website with AWS, using Lambda, S3 and CloudFront. No data bases, just something small.

  • A man standing in front of a large screen showing to very similar screenshots.
    Nov 3, 2024

    Visual Regression Testing with Playwright

    How do you test 3D transformations? In my last project I had this problem and the only viable way that I found were visual regression tests. I played with visual testing a couple of years ago, using Selenium and other tools. Now I wanted to find out how well it works with the latest of the testing-frameworks: Playwright.

  • A Raspberry PI board with a display showing the letters "NextCloud SSL Security", a glowing green lock symbol in front of the board"
    Oct 11, 2024

    Internal Nextcloud on a Raspberry PI with SSL

    I have replaced my old server "Merlin" with a Raspberry 5 a 2TB NVMe disc and Nextcloud. And since it wants to use HTTPS by default, and I cannot use LetsEncrypt in my local network, I created a tiny CA based on shell scripts.

  • A close-up of a hard drive.
    Feb 3, 2024

    Restart mdadm and lvm on usb device after disconnect

    A note to my future self, when it has forgotten the commands to do this. With a multi-disc usb case, a soft-raid with lvm, how do I fix the connection after disconnecting the cable?

  • Jan 14, 2024

    Wooden Enterprise D (Transfer paint on wood)

    How did I manage to transfer the laser-printed cutting lines onto wood? I tried different things. Here is my conclusion.

  • Jan 1, 2024

    Wooden Enterprise D (Aligning decks)

    I cleaned up a lot of stuff and made a 3d-model. And I published my sources, but not as Open Source (yet)

  • Dec 29, 2023

    Wooden Enterprise D (Approach)

    Holiday projects are nice. And this one does not have to do much with programming. I am going to build an Enterprise D lamp from 4mm wood sheets. This is about planning and fist steps.

  • May 14, 2023

    Vite, TypeScript, bundle-size

    In this post, I want to share some interesting conclusions from my attempt to write the baa-lexer. How can I reduce the bundle-size of my TypeScript project, without sacrificing modularity? Which compiler-settings create boilerplate code that can be omitted?

  • Apr 21, 2023

    I wrote my own lexer

    "Small" does not have to mean "dirty". For my "handlebars-ng" project, I rewrote an existing JavaScript lexer from scratch and despite my focus on readable code and a concise architecture, it turned out to be smaller than the original and slightly faster.

  • Apr 18, 2023

    Privacy-aware web tracking and "small-tech"

    I am now tracking site-usage of various sites. But I am not tracking you. How does that work? A short glance in into the world of small tech-companies that do not sacrifices their values for profit..

  • Jan 4, 2023

    Solid.js, the best of Vue and React

    I recently created a new website and came across SolidJS, a relatively new web-framework. What amazed me was the fact that it combines the good things from React and Vue, leaving away the bad parts. For future projects, if it's my decision alone, I will consider it as a replacement for React.

  • Oct 29, 2022

    Self hosted GitLab-Runner in VirtualBox and k3s

    When I ran out of CI/CD minutes on gitlab.com, I had to find a solution to run my own GitLab-Runner, preferably so that I didn't have to pay for the computing time. I decided to run it on my own computer.

  • Oct 7, 2022

    Tools for testing with msw.js

    This article shows two tools that help you write tests with the mock-service-worker library.

  • Sep 4, 2022

    Middleware for the mock-service-worker

    The mock-service-worker can be used to mock backends. You can use it in tests, but also in demos. Unlike real http-server frameworks like express.js, the mock-service-worker does not have that notion have "middleware", and I struggled a bit my mock-authentication for the Gachou demo implemented... Here is a solution, and may be feature-suggestion for the Mock Service Worker team.

  • Aug 15, 2022

    Type-safe mock-backends with Mock Service Worker and OpenAPI

    We can convert OpenAPI specs to TypeScript clients. We can create mock-APIs with the mock-service-worker library. How about converting an OpenAPI spec to TypeScript types for the Mock Service Worker library. It's magic...

  • Aug 7, 2022

    Mocking the backend

    End-to-end tests tend to be slow and flaky. So how about using a mock backend to test your frontend. The "mock-service-worker" library helps you create such backends. And you can use it for more than just testing.

  • Jul 3, 2022

    Type-safe API clients for web-frontends

    Many backend frameworks, independent of the language in use, can automatically generate OpenAPI specifications the server code. We can use this specification to build documentation and a user-interface for testing. But we can also use it to generate client code for our web-frontend. Here are some code-generators.

  • Jun 11, 2022

    You don't need husky for git-hooks!

    When going mono-repo, I noticed that the Node.js package "husky" can actually be replaced by a single line of code. And it works for people that do not have Node.js installed.

  • Jun 5, 2022

    Git: Merging multiple repositories into a mono-repo

    How I converted my project of three repositories into one monorepo - without losing the git history!

  • May 31, 2022

    My frontend tools odyssey

    I actually wanted to use Preact for my pet project. Several build-tools and frameworks later, I stuck with the things that I know mostly. Read on, if you are interested in a non-comprehensive evaluation...

  • May 21, 2022

    End-to-End testing with GitLab CI/CD

    End-to-End tests require the whole application to be running. This includes backend and database - which have to talk to each other. I thought it was not possible to do such a setup in GitLab CI/CD. Now I know better.

  • May 14, 2022

    Setup test-data for Quarkus integration tests

    In Spring-Boot, creating test-data was easily done via the `@SqlGroup`. Quarkus does not support this feature. Even worse: If you want to run Quarkus-tests against a native image, you don't have access to the internals of the project at all. This article describes my way of solving the issue of providing predictable test-data to integration tests.

  • Apr 29, 2022

    Clean Architecture With Quarkus

    For my pet-project Gachou, I decided to use Java and Quarkus to implement the backend. And since I have used clean-architecture at work for a couple of years now, I decided to use the same thing here. A pity, that we always used Spring Boot and Quarkus has some quirks of its own in this respect. Read on, if you want to know how I solved the exercise...

  • Jan 16, 2022

    Typed routes

    The obvious benefits of TypeScript is type-safety in function calls, variables assignments and so on. This post describes use-cases that are not obvious, but can still help you with your typings.

  • Jan 4, 2022

    Preact project setup with formatting and linting

    This article describes the basic project setup of the Gachou frontend in more detail.

  • Dec 22, 2021

    Gachou: Frontend Setup

  • Partial screenshot of https://gachou.knappi.org
    Dec 19, 2021

    Gachou Revival

About Nils Knappmeier

I have written programs since I was 11 years old and worked full-time as developer since 2007 when I graduated from TU Darmstadt. I also code in my free time, but I like crafting, Aikido and other things as well.

At the moment, I work at cosee in Darmstadt.

Profiles:
My homepage Github Linked in Bluesky
My e-mail has been copied to your clipboard
Donate:
Paypal Liberapay Github Sponsors
© 2025 Nils Knappmeier. CC BY-NC 4.0
Impress / Privacy