Sector file // nodejs
NODE.JSDECODED.
Event loop, streams & APIs
Easy
32 questionsHow do you enable gzip/Brotli compression for HTTP responses?
Backend · 1.2k views · nodejs, http, compression
Explain the difference between require() and import in Node.js.
Phone Screen · 1.0k views · modules, commonjs, esm
How do you handle CORS (Cross-Origin Resource Sharing) in Node.js?
Frontend · 992 views · cors, security, express.js
What are stream piping and the .pipe() method in Node.js?
Phone Screen · 978 views · streams, file-system, pipes
What does the Node.js --watch flag do and how does it replace nodemon?
Backend · 954 views · nodejs, tooling, dx
What is the difference between readFile and createReadStream in Node.js?
Phone Screen · 884 views · file-system, streams, memory
What is the role of the path module and why is it preferred over manual string concatenation?
Phone Screen · 873 views · path, file-system, cross-platform
Explain how modules work in Node.js.
Phone Screen · 826 views · modules, commonjs, es modules
Medium
74 questionsHow does the Node.js event loop work?
DSA · Amazon · 2.9k views · node, event-loop, async
What is AbortSignal.timeout and how do you cancel async work cleanly?
Backend · 1.2k views · nodejs, async, abortcontroller
How do you mock modules, timers, and network calls in Node.js tests?
Backend · 1.2k views · nodejs, testing, mocking
How would you implement caching in a Node.js application?
System Design · 1.2k views · caching, performance, redis
Explain the concept of 'event-driven architecture' in Node.js.
System Design · 1.2k views · event-driven, architecture, event loop
What is CSRF and how do you protect a Node.js API against it?
Backend · 1.2k views · csrf, cors, security
What are 'Event Emitting' patterns and how does error-first callback convention relate to them?
Low-Level Design · 1.2k views · async, patterns, events
When would you choose Node.js over other backend technologies?
System Design · 1.1k views · use cases, scalability, real-time
Hard
37 questionsHow do you profile CPU usage with --prof, 0x, or clinic.js flame graphs?
Backend · 1.1k views · nodejs, performance, profiling
How do you handle circular dependencies in Node.js?
Low-Level Design · 1.1k views · modules, commonjs, architecture
How does CommonJS `require()` an ES Module in modern Node.js?
Backend · 1.1k views · commonjs, esm, require
What is a ReDoS (Regular Expression Denial of Service) attack and how do you avoid it?
Backend · 1.0k views · nodejs, security, redos
What is diagnostics_channel and when would you use it?
Backend · 1.0k views · nodejs, observability, diagnostics
When would you use `child_process` module in Node.js?
System Design · 1.0k views · child_process, system calls, concurrency
How do you implement a circuit breaker for unreliable downstream services?
System Design · 975 views · nodejs, resilience, circuit-breaker
What are memory leaks in Node.js and how do you detect them?
Low-Level Design · 950 views · memory, debugging, v8
Seen a Node.js question that is not here? Add it and help the next candidate.
Share a question