<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ben Scholzen 'DASPRiD'</title>
    <description>The latest articles on DEV Community by Ben Scholzen 'DASPRiD' (@dasprid).</description>
    <link>https://dev.to/dasprid</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3602804%2F9da74ffa-dd25-404b-82b4-ebf5e93756a7.png</url>
      <title>DEV Community: Ben Scholzen 'DASPRiD'</title>
      <link>https://dev.to/dasprid</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dasprid"/>
    <language>en</language>
    <item>
      <title>About Taxum, or why I wrote my own NodeJS Framework</title>
      <dc:creator>Ben Scholzen 'DASPRiD'</dc:creator>
      <pubDate>Sat, 08 Nov 2025 22:47:55 +0000</pubDate>
      <link>https://dev.to/dasprid/about-taxum-or-why-i-wrote-my-own-nodejs-framework-4bom</link>
      <guid>https://dev.to/dasprid/about-taxum-or-why-i-wrote-my-own-nodejs-framework-4bom</guid>
      <description>&lt;h1&gt;
  
  
  Where I came from
&lt;/h1&gt;

&lt;p&gt;I've started out as a PHP developer, using Zend Framework for a large part of my career. Quite a few years ago my projects started shifting to NodeJS, starting with &lt;a href="https://expressjs.com/" rel="noopener noreferrer"&gt;ExpressJS&lt;/a&gt; like many others.&lt;/p&gt;

&lt;p&gt;I very quickly switched from raw JavaScript to TypeScript due to the improved DX experience and type safety. With that switch I also looked for a framework back then which not only supported TypeScript better, but also had proper support for async-await. This made me land on &lt;a href="https://koajs.com/" rel="noopener noreferrer"&gt;Koa&lt;/a&gt; at the time.&lt;/p&gt;

&lt;p&gt;I did end up using Koa for many years to come and was happy with it. I did never stand completely still though and was always looking if there's something out there which would offer me better DX. I came across Fastify, Hono, Hapi, and others, but I did not really like any of their architectures more than Koa.&lt;/p&gt;

&lt;h1&gt;
  
  
  Discovering something new
&lt;/h1&gt;

&lt;p&gt;In the past few years I started working more and more with Rust, and eventually I did write some smaller APIs with &lt;a href="https://github.com/tokio-rs/axum" rel="noopener noreferrer"&gt;Axum&lt;/a&gt;. I really enjoyed the way Axum applications were structured and how requests and responses flow, which was unlike anything I had seen in the NodeJS world before.&lt;/p&gt;

&lt;p&gt;Both middleware and handlers would always receive a request object and return either a response or any value which can be turned into a response. Handlers also have the option to use extractors to validate and extract certain aspects of a request, instead of working with the raw request object.&lt;/p&gt;

&lt;p&gt;On top of that both requests and responses have the concept of extensions. So while NodeJS frameworks drag a "state" object along which always needs to be fully typed, extensions always represent a single typed value.&lt;/p&gt;

&lt;p&gt;I knew that there would be very few cases where I could use Rust in my client projects though, as most of them are not proficient in Rust, and thus I'd be the only one being able to maintain it.&lt;/p&gt;

&lt;h1&gt;
  
  
  The beginning of Taxum
&lt;/h1&gt;

&lt;p&gt;A couple months ago I started prototyping certain aspects of Axum in TypeScript. This quickly became a rats tail, as Axum heavily depended on Tower, which in turn depended on the HTTP crate.&lt;/p&gt;

&lt;p&gt;I knew that in order to reproduce the same flow as in Axum, I'd need to implement a similar infrastructure in TypeScript as the HTTP and Tower crate supply, so I got started on that. I used both the crates source and their unit tests as the base for my code and worked out those two, before moving on to writing the actual framework code itself.&lt;/p&gt;

&lt;p&gt;Once I got started on the framework though, I noticed certain things do not carry over easily from Rust to TypeScript. I needed quite a few iterations to get to a point which is both type-safe as well as developer friendly.&lt;/p&gt;

&lt;p&gt;When it came to routing, I didn't feel like implementing path matching all on my own, not when there is already a really good candidate out there. I thus ended up using &lt;a href="https://github.com/delvedor/find-my-way" rel="noopener noreferrer"&gt;find-my-way&lt;/a&gt; for that, even though I only ended up using it for its radix tree.&lt;/p&gt;

&lt;h1&gt;
  
  
  How Taxum turned out
&lt;/h1&gt;

&lt;p&gt;I finally managed to get Taxum into a state I considered stable enough. I had stopped iterating over the API design and started using a pre-release in a client project. This made me discover a few minor bugs which I fixed over the coming weeks, before I decided to call it good enough for a first stable release.&lt;/p&gt;

&lt;p&gt;I've been using it several production projects successfully by now, and I feel confident that others might enjoy working with it as well.&lt;/p&gt;

&lt;p&gt;I ran some benchmarks along the way, and while it does not outperform the fastest NodeJS frameworks, it's unnoticeable once I/O operations come into play.&lt;/p&gt;

&lt;p&gt;The last task was writing a documentation, which is usually not my strongest ability. While I already had very good docblocks in the code, together with examples, I ended up using Vitepress to write a more comprehensive guide which explains all the fine details.&lt;/p&gt;

&lt;p&gt;If you're interested in the framework, I'd recommend having a look at the &lt;a href="https://taxum.js.org/" rel="noopener noreferrer"&gt;website and documentation&lt;/a&gt;. Also feel free to watch or star the project &lt;a href="https://github.com/dasprid/taxum/" rel="noopener noreferrer"&gt;on GitHub&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>node</category>
      <category>http</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
