
The Execution Context in JavaScript
Execution context defines how JavaScript code runs, from global scope to function calls. Here, I explore how it works in browsers, React, Next.js, and Node.js.
Articles
Node.js is a cross‑platform, open‑source JavaScript runtime outside the browser. The interesting part is not that front‑end engineers can avoid another language; it is that the same language can support servers and build tooling whilst taking on a very different set of runtime responsibilities.

Execution context defines how JavaScript code runs, from global scope to function calls. Here, I explore how it works in browsers, React, Next.js, and Node.js.

Resume a Node.js CMS migration after a lost reply or killed process. Reconcile stable identities, verify checkpoints, and stop before overwriting manual edits.

Run small TypeScript build scripts with Node's native type stripping. Keep type checking separate, pin the runtime, and test syntax and module limitations.

When you set up a custom domain in Vercel, the default vercel.app subdomain still serves your site, which can lead to duplicate content. Here's how to fix it.

Vue 3 replaces Vue 2's getters and setters with JavaScript proxies. This article explains how they differ and why proxies improve Vue's reactivity system.

Protect Next.js routes with Proxy, formerly Middleware, using authentication, authorisation, matchers, API request checks and current terminology.

Connect a Next.js production error digest to server records, request IDs, and route context with onRequestError, without logging private request data.

Test packed Node.js packages with CommonJS and ESM consumers, catching missing files, export conditions, duplicate state, and asynchronous module graphs.

Keep Node.js fetch pools moving by consuming or cancelling response bodies, with bounded streaming, reader ownership, and explicit connection settings.

A practical guide to implementing authentication in Next.js with NextAuth.js, including sessions, callbacks, route protection, and router‑specific trade‑offs.

Diagnose Node.js memory growth beyond the V8 heap by comparing retained objects, Buffers, allocation churn, worker measurements, and safe heap snapshots.

Add seeded randomisation to an SSR Gatsby project, keeping content order deterministic across builds whilst still rotating destination‑style content.

Best practices for managing environment variables in Next.js, so secrets stay server‑side and deployments do not freeze the wrong values at build time.

Test a real Node.js command with node:test. Check its exit status, stdout, stderr, and generated files, then prove the tests catch three deliberate regressions.

Handle Node.js shutdown with real signals, an admission gate, drained HTTP requests, separate upgraded sockets, and a deadline that includes cleanup.

Check a copied Next.js standalone deployment for missing runtime files, shared workspace data, public assets, and client JavaScript before releasing it.

mini-css-extract-plugin Warnings in GatsbySeeing Conflicting Order warnings in your Terminal whilst building your Gatsby project is not uncommon, but fortunately is very easy to fix (or suppress) too.

Separate blocked JavaScript, worker‑pool contention, and slow upstream requests using Node.js event loop measurements, a canary route, and controlled faults.