AZ.dev

Node.js

Runtime APIs, module system, and server-side patterns

How-To Guides

A storage URL builder and its static file handler must share one prefix constant
When a storage abstraction returns URLs that the app's static-file handler is supposed to serve, the two must agree on...
fastifystatic-filesimage-storageurlsdebugging
Content-hash dedup that restores a soft-deleted row must re-run quota and limit checks
Content-hash dedup is supposed to be free: same bytes, same row, no charge. If your delete is soft, "no charge" becomes...
dedupsoft-deletequotarace-conditionpostgres
Serialize per-user check-then-write flows with pg_advisory_xact_lock(hashtext(id))
When the same user can race against themselves on a check-then-write flow (multi-tab uploads, double-clicked submits),...
postgresprismaconcurrencyadvisory-lockquota
Reproduce Railway's npm ci locally with the exact npm version
When a Railway deploy fails with errors that don't reproduce locally, the cause is almost always a different npm...
npmnpm-cirailwayrailpackpackage-lock

Error Solutions

Fix "Cannot find module" with ES modules in Node.js
Node.js ES modules require explicit file extensions in import paths. Unlike CommonJS (), the module resolver does not...
esmmodulesimportextensions