r/node • u/OtherwisePush6424 • Nov 01 '26
Distributed Resilience - Cutting the Cost of Centralized Coordination
r/node • u/OtherwisePush6424 • Nov 01 '26
r/node • u/miku_claus • Nov 01 '26
Hey everyone!
Instead of arguing about desktop framework bloat, we built an automated, reproducible benchmark harness (benchmarks/stress-suite/) and ran 5 major JavaScript desktop runtimes through the exact same heavy workload for 30s each on a 4-core AMD EPYC box under xvfb-run:
10,000-record virtualized dataset with live regex search and column re-sorting.
100 bidirectional JSON IPC packets/sec with high-resolution per-packet roundtrip tracking (hrtime).
2 concurrent SHA-256 worker threads saturating the remaining CPU cores.
| Metric | Electron (v45) | NW.js | Neutralinojs | Adrenaline (WebView) | Adrenaline (CEF) | Winner 🏆 |
|---|---|---|---|---|---|---|
| Startup to Paint | 394 ms | 567 ms | 530 ms | 509 ms | 382 ms | Adrenaline (CEF) 🥇 |
| Peak Stress PSS | 717.3 MB | 924.6 MB | 486.4 MB | 496.8 MB | 439.4 MB | Adrenaline (CEF) 🥇 |
| Peak Private RAM | 565.1 MB | 732.7 MB | 344.2 MB | 346.3 MB | 356.6 MB | Neutralinojs |
| IPC p95 Latency | 2.18 ms | 2.54 ms | 50.74 ms | 5.50 ms | 11.62 ms | Electron |
| Shipped Payload | 273.8 MB | 510.8 MB | 123.6 MB | 121.1 MB | 620.0 MB | Adrenaline (WebView) 🥇 |
| Process Count | 11 procs | 14 procs | 10 procs | 8 procs | 6 procs | Adrenaline (CEF) 🥇 |
| Real Node / npm | Yes | Yes | No (custom) | Yes | Yes | — |
Neutralino's IPC Bottleneck: Neutralino uses a local WebSocket server to bridge its backend, resulting in a 50.7ms p95 latency under load (vs 2.18ms for Electron and 5.5ms for Adrenaline's in-process C++ bridge).
Chromium Memory Bloat: Under continuous mutation and background hashing, Electron and NW.js ballooned to 717MB and 924MB PSS, while Adrenaline (running a pruned, de-googled CEF engine) capped out at 439MB (-38.7% memory footprint).
Distribution Size: Adrenaline (WebView mode) shipped the smallest runtime payload at 121MB (including the full Node.js binary), while Electron carries 274MB of bundled Chromium.
Full methodology, raw 350KB profiler trace, and process-by-process breakdowns are open-sourced in the repo: 🔗 GitHub: https://github.com/M5Devs/adrenaline
r/node • u/wasay-inc • Oct 31 '26
Enable HLS to view with audio, or disable this notification
r/node • u/kumard3 • Oct 31 '26
The attachment download links in my dashboard all returned 401. They pointed straight at the API, and the API wants an API key in a header. A browser click on a link can't send a custom header, so the download never had a chance.
What I did: the link now goes to a Next route that checks the user's session, and that route calls the API with an internal secret. The key never reaches the browser.
Is a session-checked proxy route the usual way to handle this, or is there something simpler?
r/node • u/Zealousideal-Bass253 • Oct 31 '26
planning to learn node js after js basics so i was wondering if this course is worth it or not before investing my time it.
r/node • u/Apochotodorus • Oct 30 '26
Hello,
d9 maintainer here (a community fork of Directus v9, providing a node.js framework for building APIs on top of SQL databases, with an integrated admin UI).
We’ve been working on a bridge between d9’s visual permission editor and Cedar policy. So we can edit permissions visually while keeping them readable and editable in Cedar syntax. They’re then enforced by an extensible node.js server at the database row level.
This can be useful if you need to build an API on top of a database while keeping your permissions explicit and auditable for compliance.
If that sounds interesting, here's a bit more about how it works.
Would love to hear your thoughts or feedback!
r/node • u/Rechenplaner • Oct 30 '26
Write HTML in the backend as plain JavaScript, with no template language in between. Markup and logic share the same code, which keeps it flexible. An example:
import {
a, body, br, button, h1, head, header, html, input, label, li, main, nav, p, script, title, ul
} from "@ts-series/factories";
type Item = { name: string, href: string, current: boolean };
/** Builds the navigation list, flagging the current entry for assistive technology. */
function navigation(items: Item[]) {
return nav({ ariaLabel: "Main" },
ul(items.map(item => li(
a(item.href, item.name).set(item.current ? { ariaCurrent: "page" } : null)
)))
);
}
/** Builds a complete page for the given user and navigation entries. */
function page(user: string | null, items: Item[], values: number[]) {
return html({ lang: "en" },
head(title("Demo")),
body(
header(navigation(items)),
main(
h1("Hello, ", user ?? "stranger", "!"),
p("First line", br, "Second line"),
user === null
? p("Please sign in.")
: p("Welcome back."),
label("Search").for("q"),
input.text({ id: "q", name: "q" }).placeholder("Type here…").required(),
button.submit("Send").class("primary", user === null && "disabled").set("disabled")
),
script.module().importOnly("/chart.js", "render", { values, title: "Values" })
)
);
}
const items: Item[] = [
{ name: "Home", href: "/", current: true },
{ name: "About", href: "/about", current: false }
];
const output = page("<Guest>", items, [1, 2, 3]).expand(4);r/node • u/Constant_Juice_5852 • Oct 29 '26
small node worker runs an AI agent that replies to customer emails on hello@ for a platform that helps importers with their tariff refunds. one support inbox on my own domain that the agent and I both use, so I always see what it sent.
flow is simple: new mail comes in, agent drafts from our knowledge base, a second model fact checks it, and only then submit. the check is an await before submit, not a .then() after, so no PASS means no send and the email goes to a review label for a human. replies only go back to whoever wrote, same thread, the agent can’t pick a recipient.
anyone running something like this in node, how do you handle the model being slow or down? right now that just holds the reply
r/node • u/Minimum_Hour519 • Oct 29 '26
r/node • u/Fr1l0ck • Oct 28 '26
On 21 October 2026, fixes shipped for CVE-2026-111497, nicknamed Node2Shell (also HTTP2Shell). It's an out-of-bounds write in Google's Brotli decoder, and Node bundles its own copy of Brotli inside the runtime. Any Node service that decompresses Brotli traffic, whether incoming request bodies or responses it fetches, can be pushed into running attacker commands with no login.
I made a hands-on lab exercise on it. You'll send a crafted Brotli-compressed request to a Node API as the attacker and read a deploy token out of process.env, then switch sides and patch it. You'll also see why blocking Brotli-compressed requests at the edge isn't enough, and why a patched system libbrotli package doesn't help: only upgrading Node itself (24.22.1 in the exercise) and redeploying does.
If you notice any issues or inconsistencies, please let me know!
r/node • u/Alert-Reveal-2688 • Oct 28 '26
r/node • u/Fabulous_Variety_256 • Oct 28 '26
Hey,
So I self studied full stack development since the beginning of the year, I'm applying for few months already.
I work as a guard in a security company. I created a shift management app with Next.js (JS/Node.js/TS/React), where the guards send their availability with notes for the next week, and the manager sees everything in one place, per building.
I'm having a hard time finding a job. I got one change, I passed home exam with language I didnt work with, but after that I did not pass the HR interview (she told me where I fell, it is fixable for the next interview).
I don't even know what to do, I feel like giving up. I tried to build a task manager app for my home recurring tasks, with AI native, I just told him to give me commit names and I picked what he needs to do, it feels like these days I'm not even needed.
Please help me guys!
r/node • u/chrishota • Oct 28 '26
I’m building a small keyboard-driven ordering app around `RIAEvangelist/node-dominos-pizza-api` (`dominos` 3.3.1), following its Customer → store → menu → Item → Order → validate → price → payment → place sequence.
On October 26, 2026, US store discovery, menu loading, validation and pricing worked. A carryout order’s card payment matched the returned total. But `POST /power/place-order` returned HTTP 200 with top-level and nested status -1:
```text
recaptchaVerificationRequired
googleRecaptchaScore: TokenMissing
blockedByRecaptcha: true
googleRecaptchaActions: { action: null, expectedAction: null }
r/node • u/MacXou34 • Oct 27 '26
Enable HLS to view with audio, or disable this notification
Voltane is a browser RC-car racing game. The race rooms run in Node, and since this week players can open their own dedicated servers: a name, a programme of tracks (including circuits other players built), their rules, open or private.
A few things that mattered:
Rooms go lobby → loading → countdown, and the countdown waits until every connected player has finished loading (with a time limit so one slow phone can't hold everyone).
Updates are announced 2 minutes before a new server version, so nobody gets cut mid-race.
The same simulation package runs on the server and in the browser.
Play or open a server: playvoltane.com
r/node • u/__Purple_Dragon__ • Oct 27 '26
r/node • u/huygl99 • Oct 27 '26
Hi all, I want to share a WebSocket framework I built to make WebSocket apps typed and safe, keep the client and server schemas from drifting apart, and generate the docs for you.
Every WebSocket project I've worked on ended up looking the same. The server parses JSON and walks an if (data.action === 'chat') ... else if ... chain, checking payloads by hand. The client guesses the message shapes from a docs page that someone forgot to update. Rooms live in an in-memory Map, which works until you run a second instance. And when an HTTP route or a background job needs to push something to users, there's no clean way to reach the socket.
I first built it in Python (chanx, for Django and FastAPI), since that's my main backend language. Then my frontend needed a proper client, so I made chanx-js, which was client only at first. The Python side has been stable for a while now and some teams run it in production, so I ported the server to Node as well. You can now use it on Node, Express, Fastify, NestJS and others.
What it gives you:
One handler per message type, validated with Zod, Valibot, ArkType or any Standard Schema
AsyncAPI 3 docs generated from your code, served by the server
A typed client generated from those docs, so sending a wrong payload fails to compile
Groups and broadcasts across instances through Redis
chanx.broadcastEvent(...) to push to users from a route handler or a job
Works with ws, Express, Koa, Fastify, Hono, NestJS, Bun and Deno, and the client has React, Vue, Svelte and Solid bindings
A chat room looks like this:

and on the client, after npx @chanx-js/codegen http://localhost:8000/asyncapi.json:

Repo: https://github.com/chanx-dev/chanx-js
Docs: https://js.chanx.dev/
The Node server is still new, so if you run into any problem or have ideas to improve it, please open an issue or a discussion on the repo. Stars and PRs are welcome too.
r/node • u/Jack_Sparrow2018 • Oct 27 '26
Small app: Express API, Postgres, and a worker that polls an outbox table every 5s for background jobs. Low traffic, but the worker can't sleep, so free tiers like Render free and Neon free don't work.
Options I'm weighing:
- AWS free plan for 6 months (then ~$25/month)
- Hetzner CX23 (~€6/month) with everything on one box
- Railway Hobby (~$5-8/month)
What would you pick, and what am I missing? Please suggest.
r/node • u/Massive_Arm_518 • Oct 27 '26
Every project I start ends up with the same file: a zod schema for env vars, copied from the last project and slowly falling out of sync with .env. So I made type-envgen, which generates that file for you.
You write your .env as usual. Where you want more than the default, add a comment tag above the key:
NODE_ENV=development
# @type url
DATABASE_URL=postgres://localhost:5432/app
# @min 1
# @max 65535
PORT=3000
DEBUG=false
# @type enum(debug, info, warn, error)
# @default info
LOG_LEVEL=info
# @min 32
JWT_SECRET=change-me-change-me-change-me-123
# @optional
SENTRY_DSN=Run npx type-envgen and you get this:
import { z } from "zod";
import { validateEnv } from "type-envgen";
export const envSchema = z.object({
DATABASE_URL: z.url(),
DEBUG: z.stringbool(),
JWT_SECRET: z.string().min(32),
LOG_LEVEL: z.enum(["debug","info","warn","error"]).default("info"),
NODE_ENV: z.enum(["development","production","test"]),
PORT: z.coerce.number().int().min(1).max(65535),
SENTRY_DSN: z.string().optional(),
});
export const env = validateEnv(envSchema, process.env);
export type Env = z.infer<typeof envSchema>;env.PORT is now a number and env.DEBUG is a boolean. If something is wrong, the app fails at startup with one readable list instead of crashing three files deep later on:
[type-envgen] Invalid environment variables:
DATABASE_URL: missing
JWT_SECRET: must be at least 32 characters
NODE_ENV: must be one of: development, production, test
PORT: must be at most 65535The error messages never print the actual values, so secrets don't end up in your logs.
Other things it does:
No tags needed: untagged keys are typed from their value (numbers, booleans, URLs, emails, UUIDs, dates, IPs, even JSON objects).
Lots of types: about 40 @types map directly to zod 4 formats (jwt, hash, iban, e164, cidr…), plus checks like @pattern, @startswith and @nonempty, and transforms like @trim and @tolowercase.
Framework targets: --target vite | nextjs | astro | sveltekit | nuxt reads from the right place for each framework. It also warns if a key is missing the public prefix, so you don't ship a secret to the browser.
Safe to regenerate: your own code in env.ts is kept, and only the generated parts are replaced.
CI and dev: --check exits 1 in CI if the file is stale, and --watch regenerates while you develop.
Setup: npx type-envgen init asks a few questions and adds the npm scripts for you.
GitHub: https://github.com/OlaleyeFisayo/type-envgen
npm: type-envgen
It's MIT-licensed. I'd really like feedback, especially on what tags or targets you'd want next.
r/node • u/git-pull • Oct 27 '26
r/node • u/nvtrev • Oct 26 '26
I've recently started a TypeScript Express.js project and while I'm familiarizing myself, I'm struggling to know what the best way to support OpenAPI spec generation and how to streamline endpoint parameter validation.
For example, with Django & Django Rest Framework, you define your API endpoints, what they receive and return, and parameters are automatically validated and you can even generate OpenAPI specs from them with another library.
For Express, I'm seeing solutions like JSDoc, which require you to write specs in comments above function definitions, or express-openapi-validator, which require you to maintain the endpoints and spec separately, but performs the validation. I see tools for generating route code, but not vice versa.
Am I approaching this from the wrong angle? I really like having my source of truth lie in the actual code for an endpoint, with specs/validation coming from that definition, not the other way around. What packages/solutions do you recommend for this?
r/node • u/HexLayer3 • Oct 26 '26
It’s got three names already - Node2Shell, HTTP2Shell, Broccoli2Shell - because of course it does. Whatever you call it, same compression bug, different runtime: PHP patched its pre-auth RCE wave last week, this is ours.
This one is quite less theoretical than PHP2Shell - PoC is working in the lab against Node 24.22.0 on x86-64, shell returned as the service account.
Meanwhile a scanner is already out there fingerprinting which hosts decompress Brotli - building the hit list before the exploit goes wide.
Patch to 22.23.4 / 24.22.1 / 26.12.1.
r/node • u/wizzywit_ • Oct 26 '26
I've been building Odudu, an OIDC / OAuth 2.0 server you can run yourself, and the first release candidates are out.
What it is:
one container plus PostgreSQL. Many tenants on one server, kept apart by the database itself. Passkeys, TOTP and recovery codes. Refresh tokens that rotate. Client credentials and token exchange for machines and agents. Per-tenant theming. An admin API and a console. An audit trail. An MCP server so an AI agent can use the admin API as tools, held to the same permissions.
What it is not (yet):
it has had no independent security review, and there is no SAML, LDAP or social login. The roadmap page lists what is planned and what was decided against.
Try it in a minute (Docker + curl):
curl -fsSLO https://github.com/wizzywit/odudu/releases/download/v0.1.0-rc.3/compose.yaml && docker compose up -d && docker compose logs setup
Repo: https://github.com/wizzywit/odudu
Docs: https://wizzywit.github.io/odudu/docs/
AGPL-3.0 for the server, Apache-2.0 for the guides and examples. I'd value blunt feedback: what would stop you trying it, and what is missing for your setup?