Skip to content
tezvyn:
Menu

⚙️Backend Dev

Backend engineering, APIs, and databases

1093 bites

Test yourself: Top 30 Backend Dev interview questions →Multiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Everything in Backend Dev, page 8

easy1 min read

Minimal HTTP server with the http module

CreateServer with a request listener, set status and Content-Type, end the response, call listen on 3000.

easy1 min read

Why use path.join over string concatenation

Path.join uses the correct OS separator, collapses duplicate slashes, normalizes . and .. segments.

easy1 min read

fs.readFileSync vs fs.readFile

Sync blocks the event loop and returns directly, async takes a callback or promise, only sync is safe at startup.

advanced1 min read

Async iterators and for await...of for streaming

Async iterators yield values lazily over time; for await...of consumes them sequentially with backpressure, keeping memory bounded.

advanced1 min read

Promise.all vs Promise.allSettled

All rejects on the first failure; allSettled always fulfills with a status/value or reason per input. Use allSettled when partial success is acceptable.

advanced2 min read

Bounded concurrency for many async requests

Chunk the array and await Promise.all per chunk, or run a fixed worker pool pulling from a shared index; cap in-flight requests.

intermediate1 min read

Comparing the three async error-handling styles

Callbacks pass err as first arg; Promises route errors to catch; async/await uses try/catch; an unhandled rejection can crash the Node process.

intermediate1 min read

Handling async errors in Express middleware

Await inside try/catch and call next(err) on failure, or wrap the handler in an async error adapter; never let a rejected Promise go uncaught.

intermediate1 min read

Running independent requests with Promise.all and race

Start all requests then await Promise.all to get all results or fail fast on first rejection; use Promise.race when only the fastest settled result matters.

intermediate1 min read

Output order of sync, microtask, and macrotask

C runs first synchronously, then B drains from the microtask queue, then A from the macrotask queue.

easy1 min read

The three states of a JavaScript Promise

Pending, fulfilled, rejected; settle is one-way and final; create with the executor calling resolve or reject, consume with then and catch.

advanced1 min read

Monorepo workspaces vs private npm packages

Workspaces give atomic cross-service changes and instant local linking but couple release cadence; private packages give versioned isolation but add publish overhead and version drift.

advanced1 min read

Diamond dependencies and nested node_modules

Npm hoists one version to the top and nests the conflicting version under the dependent package; both coexist on disk.

advanced1 min read

Circular dependencies in CommonJS modules

When A requires B which requires A, the cache returns A's partial exports; fields defined later are undefined at that moment.

intermediate1 min read

SemVer and the caret vs tilde range operators

MAJOR.MINOR.PATCH signals breaking/feature/fix; caret allows minor and patch updates, tilde allows only patch; use tilde for tighter control.

intermediate1 min read

Layered structure for a scalable Express API

Routes map URLs, controllers handle HTTP, services hold business logic, data layer talks to the DB; keep each layer ignorant of HTTP except controllers.

intermediate1 min read

Choosing between CommonJS and ES Modules

ESM is the standard with static import/export and top-level await; set type to module; CJS uses require and module.exports and is synchronous.

intermediate1 min read

Why package-lock.json must be committed

Lockfile pins exact versions of the whole dependency tree including transitive deps; guarantees identical installs across machines and CI.

easy1 min read

Resolving core vs relative module specifiers

'fs' is a built-in core module loaded by name with top priority; './my-file.js' is a relative path resolved from the current file.

easy1 min read

dependencies vs devDependencies in package.json

Dependencies ship and run in production; devDependencies are only for development; omitted with npm install --production.

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles