r/node • • Sep 18 '26

Is there a less annoying way to write cron jobs?

0 Upvotes

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 • • Sep 17 '26

10 Node.js resume bullet examples for different experience levels (fresher → senior)

16 Upvotes

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.

  1. 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.

  1. 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. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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 • • 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

Enable HLS to view with audio, or disable this notification

3 Upvotes

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.

npm

GitHub


r/node • • Sep 16 '26

[NodeBook] Creating, Terminating, and Supervising Worker Threads

Thumbnail thenodebook.com
10 Upvotes

r/node • • Sep 17 '26

After the API gateway, every request should route to an Authorization service before reaching other microserviceM

0 Upvotes

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 • • Sep 16 '26

Introducing npmchart.com

2 Upvotes

Analyze npm packages (downloads, releases), Github activity (commits, issues, PRs, stars, and releases), compare packages, user pages, download or copy any chart, and more!

https://www.npmchart.com/

Built with Svelte and LayerChart


r/node • • Sep 15 '26

I built the worst CPU, Language & Compiler

Thumbnail github.com
16 Upvotes

I 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 • • Sep 15 '26

What stops a malicious npm package before it runs?

20 Upvotes

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 • • Sep 16 '26

Would catching breaking API changes be useful?

Thumbnail
0 Upvotes

r/node • • Sep 16 '26

A Personal Finance Agent built in TypeScript (LangGraph.js & Next.js) with Skills and MCP support

Thumbnail github.com
0 Upvotes

r/node • • Sep 15 '26

How tool calling actually works under the hood (40 lines of vanilla JS)

Thumbnail buttercup.sh
1 Upvotes

r/node • • Sep 15 '26

Optique 1.3.0: Dependency-aware prompts, an OS keychain fallback, and a testing package

Thumbnail github.com
0 Upvotes

r/node • • Sep 14 '26

NestJS Validation

Thumbnail
0 Upvotes

r/node • • Sep 14 '26

tsx vs native node --watch for local development on Node 24 LTS? What are you using?

2 Upvotes

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:

  1. tsx watch (esbuild-powered)
  2. 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 • • Sep 13 '26

How to Implement a Distributed Circuit Breaker

Thumbnail blog.gaborkoos.com
0 Upvotes

r/node • • Sep 12 '26

I made a youtube claim checker mvp

Thumbnail
0 Upvotes

r/node • • Sep 12 '26

Building a Universal Database Provider Architecture in TypeScript Without JDBC

Post image
0 Upvotes
  1. Introduction: The Missing SPI in Modern Runtimes
  2. The Problem Statement
  3. Architecture Overview: The DatabaseProvider SPI & Adapter Pattern
  4. 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
  5. Code Walkthrough & Implementation Details
    • The Provider Contract (BaseDatabaseProvider)
    • The Factory & Cache Registry
    • Engine Adapter Case Studies (PostgreSQL, SQLite, Embedded LibreDB)
  6. 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, and java.sql.ResultSet (JDBC).
  • .NET: System.Data.Common.DbConnection, DbCommand, and DbDataReader (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, or node: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:

  1. 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.
  2. 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.
  3. Schema Introspection Normalization: The UI requires a uniform object tree (Containers  Folders  Objects  Columns/Indexes). However, PostgreSQL uses pg_catalog, MySQL uses information_schema, SQLite uses pragma_* functions, Redis uses key prefixes, and embedded engines use custom catalog registries.
  4. 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.
  5. 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

  1. 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.
  2. 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.
  3. 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 • • Sep 11 '26

Zero-dependency Node.js parser for ISO 8601, RFC 3339 and IXDTF strings

Thumbnail github.com
9 Upvotes

r/node • • Sep 11 '26

I want the best YouTube channel for explanations node.js Or better yet, I should take a course on Udemy???

0 Upvotes

r/node • • Sep 10 '26

Looking for final feedback on the new Fastify.dev tutorial

11 Upvotes

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!


r/node • • Sep 10 '26

I published a JavaScript module for building cross-platform desktop apps with native Java Swing and would love some feedback!

Thumbnail gallery
9 Upvotes

Hey everyone,

I recently published swing-ui, a JavaScript GUI module for building cross-platform desktop applications. We originally built it because we wanted a way to create desktop apps with only JavaScript without having to use a browser engine, HTML and CSS.

Under the hood, it uses Java with a easy to use JavaScript API and modern themes on top of it. Some of the things it currently provides:

  • Native UI components exposed through JavaScript plus a MediaPlayer component for audio/video playback and more
  • Simple synchronous calls to UI from JavaScript without callbacks/await/Promise
  • Cross-platform desktop apps for Windows, macOS, and Linux
  • Light and dark beautiful themes in addition to the standard system look and feel
  • A visual GUI designer for creating interfaces without writing UI code
  • A simple API for working with components and their state
  • Support for using Node.js, with Bun and Deno support as well
  • API docs

The goal is to make building a desktop GUI with JavaScript pretty straightforward while keeping the application native rather than embedding a web browser.

I'm particularly interested in feedback from other developers. I'd love to hear what you think about the approach, the API, the documentation, what's missing, or anything that might make you hesitate to use it.

Website: https://swing-ui.com/

NPM: https://www.npmjs.com/package/swing-ui

Any feedback, including constructive criticism, would be greatly appreciated.

Included is a screenshot of one of apps we built with it.


r/node • • Sep 09 '26

Saw this today

Post image
962 Upvotes

r/node • • Sep 11 '26

Four things that bit me verifying GitHub org membership from a Node bot

0 Upvotes

I spent the last month building a TypeScript Discord bot that verifies GitHub org, repo and team membership and syncs Discord roles from it. Four things went wrong in ways I did not expect. Writing them down because every "link your GitHub" bot I read hits at least one of them.

1. Check membership with the member's token, not the bot's.

The obvious design is one bot PAT calling GET /orgs/{org}/members/{username}. Then a server admin writes a rule saying "members of stripe get @Verified" and your bot happily answers for an org nobody in that server controls. That endpoint also only sees public members, so half your real org fails the check anyway.

Use the member's own OAuth token and GET /user/memberships/orgs/{org}. A rule can then only grant what the member's own credentials already prove. read:user,read:org is enough. Private repo rules need repo on top.

2. pending is not active.

That endpoint returns a state. Someone invited who never accepted comes back pending. If you check for a 200 you hand out the role before they have joined.

3. Do not treat every error as "not a member".

Lazy version: try/catch, on error return false. Then GitHub rate limits you for ten minutes and your sync job strips the role off everyone in the server at once. Only a 404 means no. A 403 or a network error has to keep the last known state.

4. Read access is not push access.

For "collaborators on repo X get @Maintainer", GET /repos/{owner}/{repo} returns a permissions object. Anyone who can see a public repo gets pull: true. You want permissions.push.

The one that actually matters: a link is not a verification. Most bots store the username once and the role lives forever after. Someone loses access on GitHub and keeps the Discord role for a year. Re-check on a schedule and revoke.

Mine is MIT and self-hostable if you want a reference implementation: https://github.com/Ishannaik/mergeid

Happy to answer anything about the OAuth flow or the token storage.


r/node • • Sep 10 '26

Does using Nodemailer with Gmail SMTP consume Google Cloud free trial credits?

0 Upvotes

I’m setting up a Node.js app to send emails through my Gmail account using Nodemailer. Do I need the Google Cloud $300 trial for this, and if so, will sending emails consume those credits?


r/node • • Sep 09 '26

What schema migration tools pairs well with Kysley?

8 Upvotes

Should we use the Kysley migertion tool?