Martin Lefebvre's blog

Posts

How to publish my Obsidian-based blog

$ rsync -a --delete --info=NAME <path to blog subdir in Obsidian vault> <path to hugo-managed site>/content/posts/ $ cd <hugo-managed site> $ hugo $ git add . $ git commit -m "<Commit Message>" $ git push $ git subtree split --prefix public -b public_site $ git push origin public_site:public_site --force $ git branch -D public_site

The Singleton

Handling MySQL Connections in TypeScript: The Good, the Bad, and the “Too Many Connections” Error When building a TypeScript application that talks to MySQL, how you manage database connections matters more than it might initially appear. A seemingly harmless pattern can quietly work its way into production and, under load, bring your application down with the dreaded: Error: Too many connections In this post, we will look at a bad but common approach to handling MySQL connections, why it causes problems, and then contrast it with a simple, effective approach that leverages ES modules and the Singleton pattern—without classes.

From Dial-Up to Docker... A Developer's Journey

Hello and welcome to my personal blog! My name is Martin Lefebvre, and I’m a full-stack software developer with a passion for technology that has spanned over two decades. With 20 years in software development and 30 years of experience with Linux, I’ve had a front-row seat to the incredible evolution of our industry. This blog is where I’ll be sharing my insights, experiences, and thoughts on the ever-changing world of tech.