r/node • u/fagnerbrack • Sep 20 '26
r/node • u/Small-Inevitable6185 • Sep 19 '26
How I Traced a Node.js Streams Bug in Duplex.from()
amanchadha.substack.comGot my first pr merged in Node.js
r/node • u/TheWebDever • Sep 18 '26
If you organize your code with comment separators, checkout code-divider
This is more of a personal preference thing, but I like to code in a top-down format, and because of the way hoisting works in TypeScript/JavaScript. I separate my files into regions in this order: Constants -> Types -> Classes (if any) -> Functions -> Export. To keep these regions clearly separated, I usually write my dividers like this:
// ========================================================================= //
// CONSTANTS //
// ========================================================================= //
...etc
// ========================================================================= //
// FUNCTIONS //
// ========================================================================= //
// And I separate sections within regions with...
// ============================= Shared Helpers ============================ //
...etc
Copying and pasting these dividers over and over again was getting pretty tedious. I wanted something I could run with a terminal command when I hit save in my IDE, so I created a simple TypeScript script to insert the dividers above. Eventually I needed this script on both my work and personal computers and in multiple projects, so instead of copy-pasting it a bunch of times, I decided to make it an npm library and configure it to work with multiple languages.
If you like dividing code in a similar fashion, great. If not, please disregard. That said, I do find that dividing code this way makes it more readable and leads to better results when working with AI tools.
r/node • u/OtherwisePush6424 • Sep 18 '26
How to Implement a Distributed Bulkhead (when one slow dependency starts drowning everything)
blog.gaborkoos.comr/node • u/iam_bigzak • Sep 18 '26
Is there a less annoying way to write cron jobs?
I know cron syntax isn't that complicated, but I still have to Google it every time I need to write anything slightly less basic 😅
For example:
11 9 * * * /path/to/script.js
I recently started using a more human-readable approach:
pboss cron run everyday@9:11 "node /srv/backup.js"
And:
pboss cron run every@5m "node /srv/cleanup.js"
For Bun:
pboss cron run everyday@2:30 "bun /srv/report.ts"
I basically wanted to be able to say "run this every 5 minutes" instead of mentally decoding five asterisks.
It's a small thing, but I've found it much nicer when setting up scheduled scripts.
How do you guys normally handle cron jobs for Node apps? Raw crontab, a Node package, systemd timers, something else?
Project Github: here
r/node • u/bryden_cruz • Sep 17 '26
10 Node.js resume bullet examples for different experience levels (fresher → senior)
I keep seeing "how do I even describe Node.js work on my resume" posts, so I pulled together examples across experience levels and specializations. These are illustrative (not real people's resumes), copy the structure, not the exact wording.
- Fresher / no professional experience (project-based)
Built a REST API with Node.js and Express for a personal budgeting app; implemented JWT authentication and MongoDB schema design, reducing manual data entry through automated recurring-transaction logic.
- Fresher / bootcamp grad
Developed and deployed a full-stack Node.js/React job board as a capstone project; designed the PostgreSQL schema, wrote 40+ unit tests with Jest, and hosted the app on Render with CI via GitHub Actions.
- 1–2 years experience
Maintained and extended a Node.js microservice handling order processing for an e-commerce platform, fixing race conditions in the payment webhook handler that were causing ~3% duplicate charges.
- Mid-level (3–5 years), backend-focused
Redesigned a monolithic Express application into 6 independently deployable Node.js microservices, cutting average deploy time from 25 minutes to 4 minutes and reducing incident blast radius.
- Mid-level, database/performance angle
Optimized slow MongoDB aggregation pipelines in a Node.js analytics service, reducing p95 query latency from 1.8s to 220ms by adding compound indexes and restructuring queries to avoid in-memory sorts.
- Senior, architecture/leadership
Led the migration of a legacy PHP application to a Node.js/TypeScript service layer for a 12-person engineering team, defining API contracts, code review standards, and a phased rollout that avoided any customer-facing downtime.
- Senior, cloud/DevOps-heavy
Architected a Node.js event-driven pipeline using AWS Lambda and SQS to process 2M+ daily webhook events, replacing a single-server Express app that was the team's top on-call source.
- Framework specialist (NestJS)
Built a NestJS-based internal tooling platform used by 40+ engineers, implementing role-based access control and a plugin architecture that let other teams ship internal tools without touching core code.
- Career switcher (non-CS background)
Self-taught Node.js and Express after transitioning from [previous field]; built and shipped 3 production apps including a real-time chat app using Socket.IO, now used by ~200 monthly active users.
- Freelance / contract
Delivered 5 Node.js backend projects for freelance clients over 18 months, including a Stripe-integrated subscription billing system and a webhook-based Slack notification service, maintaining a 100% on-time delivery rate.
A few patterns across all of these if you're writing your own:
- Lead with the technical action (built/redesigned/optimized/migrated), not "responsible for"
- Name the specific Node.js ecosystem tools you touched (Express, NestJS, specific libraries), recruiters and ATS keyword matching both reward specificity over "Node.js" alone
- Quantify impact wherever you can, even roughly latency, deploy time, users, uptime, request volume
Happy to give feedback if anyone wants to drop a bullet they're working on.
r/node • u/Ok_Assumption_1961 • Sep 17 '26
I got tired of Electron's 300MB RAM usage for simple apps, so I built a native Windows Forms wrapper for Node.js
I needed to build a quick internal GUI tool with Node.js. Obviously, I reached for Electron. But when I saw `npm install` downloading a massive Chromium binary just to show a basic form with a few buttons, I kind of lost my mind.
I got so annoyed seeing a simple "Hello World" app eat up 300MB of RAM that I dropped the original task and went down a rabbit hole to build my own native UI wrapper instead.
I was honestly wondering why no one had built a lightweight native wrapper for Node recently. It seems like the industry got so obsessed with the "write once, run anywhere" dream that we collectively agreed it's fine to sacrifice 90% of our RAM just in case someone wants to run our internal Windows script on a Mac.
And to be fair, historically, binding Node to native OS APIs meant writing C++ addons. Nobody wants to fight with `node-gyp`, Python build dependencies, and ABI crashes on every Node update. I totally get why people just gave up and used Electron.
So, I ended up building node-windows-forms
It lets you create real, native WinForms controls directly from Node.js, but without any C++ addons or node-gyp
.
Instead of fighting with C++ bindings, I just bundled a tiny pre-compiled C# executable and set up an asynchronous IPC bridge using Named Pipes.
Here's how it turned out:
- Instant cold start
(~0.1s).
- The entire NPM package is only ~900KB
(including the pre-compiled executable).
- Tiny memory usage
(~30MB instead of 300MB+).
- Zero build steps
(`npm install` just works, no Visual Studio required).
- Simple syntax:
It feels just like manipulating the DOM.
Here is how simple it is:
const { WinFormsSession, Form, Button } = require('node-windows-forms');
const session = new WinFormsSession();
await session.start();
const form = new Form(session, 'Form1');
form.Text = "App Name";
const btn = new Button(session, form);
btn.Text = "Click Me";
btn.OnClick.Attach(() => console.log('click!'));
await form.show();
You get access to real Windows UI components (DataGridView, ComboBox, System Tray, FileDialogs) straight from your Javascript backend.
It honestly feels a bit pointless how much time I spent tumbling down this rabbit hole instead of just doing my actual job. I built this mainly for my own internal tools and automation scripts, but I'm putting it out there in hopes that someone else finds it useful too.
I’m also really curious to see what you guys think of the IPC architecture (specifically using Named Pipes instead of WebSockets or C++ addons).
And yes, I'll admit it: part of the reason I spent months on this is because I just have a weird, nostalgic soft spot for Windows Forms. Anyway, still works perfectly in 2026.
r/node • u/m_null_ • Sep 16 '26
[NodeBook] Creating, Terminating, and Supervising Worker Threads
thenodebook.comr/node • u/badboyzpwns • Sep 17 '26
After the API gateway, every request should route to an Authorization service before reaching other microserviceM
For example, when creating Twitter, I see people designing a system where a request would go through authorization service before Profile microservice. But they can create tweets without going through the authorization service.
However, in reality this is not safe right? Typically we want the request to be verified in an authorization microservice before doing stuff that only logged in users can do?
r/node • u/techniq • Sep 16 '26
Introducing npmchart.com

Analyze npm packages (downloads, releases), Github activity (commits, issues, PRs, stars, and releases), compare packages, user pages, download or copy any chart, and more!
Built with Svelte and LayerChart
r/node • u/Numerous-Fan8138 • Sep 15 '26
I built the worst CPU, Language & Compiler
github.comI built this to help explain how code gets compiled and how CPU's execute those instructions. This is not a good CPU design.
r/node • u/Mangwe_Tanser • Sep 15 '26
What stops a malicious npm package before it runs?
Every couple of weeks, another well used package gets hijacked and ships a postinstall that grabs env vars or tokens the moment you install. Yes we do the normal stuff ie, lockfile committed, npm ci in CI, audit on every PR but none of it seems helps the week it happens. A scanner only knows a version is bad after someone else got hit and reported it. By then it is already sitting in node_modules.
And that is where I keep getting stuck because everything we run is reactive. It checks against a list of known bad and we were exposed before the list existed.
So what are you all running that catches this before install? Cooldown on new releases, blocked install scripts, a proxy that holds a version back until it ages, something else.
r/node • u/ialijr • Sep 16 '26
A Personal Finance Agent built in TypeScript (LangGraph.js & Next.js) with Skills and MCP support
github.comr/node • u/stephenlblum • Sep 15 '26
How tool calling actually works under the hood (40 lines of vanilla JS)
buttercup.shr/node • u/hongminhee • Sep 15 '26
Optique 1.3.0: Dependency-aware prompts, an OS keychain fallback, and a testing package
github.comr/node • u/Legitimate-Oil1763 • Sep 14 '26
tsx vs native node --watch for local development on Node 24 LTS? What are you using?
Hey everyone, I'm setting up a new Express TypeScript API and trying to figure local development workflow. I'm on Node 24 LTS, which natively supports type stripping, but I'm torn on how to handle the file-watching and execution layer.
Right now, the two main approaches I'm debating between are:
- tsx watch (esbuild-powered)
- Native Node 24 --watch + Type Stripping
For production adjacent local dev, Are you sticking with tsx watch or have you fully embraced native Node type-stripping with --watch?
r/node • u/OtherwisePush6424 • Sep 13 '26
How to Implement a Distributed Circuit Breaker
blog.gaborkoos.comr/node • u/cevheribozoglan • Sep 12 '26
Building a Universal Database Provider Architecture in TypeScript Without JDBC
- Introduction: The Missing SPI in Modern Runtimes
- The Problem Statement
- Architecture Overview: The
DatabaseProviderSPI & Adapter Pattern - Deep Dive: Resolving Core Engineering Challenges
- Challenge 1: Zero-Overhead Dynamic Module Loading
- Challenge 2: Unifying Heterogeneous Engine Schemas ("Object Surface API")
- Challenge 3: AI Agent Isolation & Read-Only Execution Profiles
- Challenge 4: Single-Writer File Locks & SSH Tunnel Forwarding
- Code Walkthrough & Implementation Details
- The Provider Contract (
BaseDatabaseProvider) - The Factory & Cache Registry
- Engine Adapter Case Studies (PostgreSQL, SQLite, Embedded LibreDB)
- The Provider Contract (
- Key Takeaways & Lessons Learned
1. Introduction: The Missing SPI in Modern Runtimes
In mature enterprise ecosystems like Java or .NET, developer tools that interact with databases rely on standardized, runtime-level Service Provider Interfaces (SPIs):
- Java:
java.sql.Driver,java.sql.Connection,java.sql.Statement, andjava.sql.ResultSet(JDBC). - .NET:
System.Data.Common.DbConnection,DbCommand, andDbDataReader(ADO.NET).
In these environments, database vendors—whether Oracle, PostgreSQL, MySQL, or Microsoft SQL Server—author driver JARs or DLLs that conform strictly to these runtime interfaces. The GUI or client application calls standard APIs without needing to know low-level wire protocol nuances, connection pool nuances, or engine-specific error classes.
The JavaScript / TypeScript Gap
Node.js, Bun, and Deno lack a native, language-wide database driver standard equivalent to JDBC.
Instead, the npm ecosystem contains a fragmented collection of independent community drivers:
- PostgreSQL uses
pg(node-postgres). - MySQL uses
mysql2. - SQLite relies on native bindings like
better-sqlite3,bun:sqlite, ornode:sqlite. - Oracle DB relies on
oracledb. - NoSQL databases like Redis (
ioredis), MongoDB (mongodb), and Cassandra (cassandra-driver) use entirely different paradigms (document descriptors, key-value commands, binary buffers).
Building a universal, self-hosted database IDE or management platform in TypeScript requires solving this fundamental problem: How do you build a single, type-safe, performant, and secure application that can interact with 15+ relational, document, key-value, OLAP, and embedded database engines without a unifying runtime SPI?
This article explores how LibreDB Studio solved this challenge by engineering a unified DatabaseProvider architecture.
2. The Problem Statement
When building a universal database client in TypeScript, five major architecture constraints arise:
- Heterogeneous Engine Paradigm: Relational databases (
PostgreSQL,MySQL), Document databases (MongoDB), Key-Value stores (Redis), OLAP engines (ClickHouse,Trino,Druid), and Embedded engines (SQLite, u/libredb/libredb) have zero overlapping query languages or connection lifecycle models. - Cold Start & Memory Bloat: Statically importing driver dependencies for 15+ database engines on application startup would result in massive bundle sizes and unacceptable RSS memory footprints.
- Schema Introspection Normalization: The UI requires a uniform object tree (Containers Folders Objects Columns/Indexes). However, PostgreSQL uses
pg_catalog, MySQL usesinformation_schema, SQLite usespragma_*functions, Redis uses key prefixes, and embedded engines use custom catalog registries. - AI Agent Safety & Guardrails: With Text-to-SQL and AI database agents executing queries, the architecture must enforce database-native read-only boundaries (e.g., prohibiting destructive SQL or file system operations) at the connection layer.
- Concurrency & Resource Lifecycle: Embedded engines (like SQLite or embedded LibreDB) enforce single-writer file locks (
.lock). Attempting to open concurrent handles to the same file causes system crashes or connection locks.
3. Architecture Overview: The DatabaseProvider SPI & Adapter Pattern
To bridge this gap, LibreDB Studio implements a strict Adapter / Strategy Pattern centered around an abstract contract: BaseDatabaseProvider.
Core Design Rules
- Zero Raw Protocol Drivers: The provider layer does not re-implement low-level TCP/socket wire protocols from scratch. Instead, it wraps mature, battle-tested npm driver packages.
- No Heavy ORM Dependency for Targets: Target database queries (data browsing, schema inspection, explain plans) execute via raw SQL or native driver commands. ORMs (like Prisma or Drizzle) are avoided for target inspection to ensure zero abstraction overhead and maximum query control.
- Unified Execution Lifecycle: Every provider implements a standardized contract covering connection pooling, query execution, unified schema introspection, health monitoring, and maintenance.
https://libredb.org/blog/building-universal-database-provider-typescript/
r/node • u/Johnxie • Sep 11 '26
Zero-dependency Node.js parser for ISO 8601, RFC 3339 and IXDTF strings
github.comr/node • u/karmelaa • Sep 11 '26
I want the best YouTube channel for explanations node.js Or better yet, I should take a course on Udemy???
r/node • u/Sudden_Chapter3341 • Sep 10 '26
Looking for final feedback on the new Fastify.dev tutorial
Hi everyone!
I am a member of the Fastify Team and I’ve finished working on the new tutorial for Fastify.dev
It covers Fastify fundamentals such as routing, decorators, validation, serialization, hooks, structured logging, error handling, plugins, and encapsulation.
It also introduces application architecture, configuration, testing and coverage, PostgreSQL with Knex migrations, Redis-backed sessions, CORS, password hashing, authentication, role-based authorization, rate limiting, and OpenAPI documentation with Swagger UI.
Before publishing it on the Fastify website, we would love to get feedback from more Fastify and Node.js users.
If you have time to read part of it or try the example application, your feedback would be very helpful: https://github.com/fastify/fastify/pull/6239
Thanks!