-
-
Notifications
You must be signed in to change notification settings - Fork 43.7k
feat: Add 10 comprehensive Node.js interview questions #9561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat: Add 10 comprehensive Node.js interview questions #9561
Conversation
This significantly expands the Node.js question coverage: New questions added: - Event loop working and its 6 phases - Streams and buffers deep dive - Cluster vs worker threads comparison - Memory leak debugging techniques - Middleware pattern in Express - Async patterns (callbacks, promises, async/await) - Security best practices (SQL injection, XSS, CSRF) - Performance optimization techniques - Testing asynchronous code - NPM package security Each question includes: - Detailed explanations - Working code examples - Best practices - Common pitfalls to avoid This increases Node.js questions from 8 to 18, providing comprehensive interview preparation coverage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds ten new in-depth Node.js interview content files, expanding coverage into advanced topics such as the event loop, async patterns, performance, security, and testing.
Changes:
- Added detailed markdown content on advanced Node.js internals (event loop, clusters vs worker threads, memory leaks, async patterns).
- Added practical guides for operational topics (streams & buffers, performance optimization, security best practices, npm package security).
- Added testing-focused content including async testing patterns in Jest and Mocha, HTTP endpoint testing, mocking, timers, and event emitters.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
src/data/question-groups/nodejs/content/testing-async-code.md |
Documents Jest/Mocha patterns, mocking, timers, event emitters, HTTP endpoint testing, and common async testing pitfalls. |
src/data/question-groups/nodejs/content/streams-and-buffers.md |
Explains Node.js streams and buffers with examples for types of streams, backpressure handling, and buffer manipulation. |
src/data/question-groups/nodejs/content/security-best-practices.md |
Covers SQL/NoSQL injection, XSS, headers, rate limiting, auth, input validation, env vars, HTTPS, and a security checklist. |
src/data/question-groups/nodejs/content/performance-optimization.md |
Provides patterns for avoiding event loop blocking, caching, DB query optimization, streaming, pooling, compression, clustering, JSON handling, and monitoring. |
src/data/question-groups/nodejs/content/npm-package-security.md |
Describes npm audit, lockfiles, automated updates, semver, detecting malicious packages, private registries, overrides, CI checks, and cleanup of unused deps. |
src/data/question-groups/nodejs/content/middleware-pattern.md |
Explains Express-style middleware types, common middleware (auth, logging, rate limiting), execution order, and best practices. |
src/data/question-groups/nodejs/content/memory-leak-debugging.md |
Introduces common Node.js memory leak sources, detection patterns, and debugging tools like inspector, heap snapshots, and clinic. |
src/data/question-groups/nodejs/content/event-loop-working.md |
Describes the six event loop phases, microtasks vs macrotasks, and usage of process.nextTick vs setImmediate with best practices. |
src/data/question-groups/nodejs/content/cluster-vs-worker-threads.md |
Compares cluster vs worker threads, with examples, use cases, shared memory, and best practices. |
src/data/question-groups/nodejs/content/async-patterns.md |
Surveys callbacks, promises, async/await, parallel vs sequential execution, Promise utilities, error handling, and common async pitfalls. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/data/question-groups/nodejs/content/performance-optimization.md
Outdated
Show resolved
Hide resolved
src/data/question-groups/nodejs/content/memory-leak-debugging.md
Outdated
Show resolved
Hide resolved
src/data/question-groups/nodejs/content/npm-package-security.md
Outdated
Show resolved
Hide resolved
- Convert all CommonJS require() to ES modules import syntax - Use compression.filter() as fallback in compression middleware - Add cleanup interval to rate limiter to prevent memory leaks - Remove unused fs.createWriteStream in heap snapshot example - Fix promisify example to use callback-based fs API - Split GET/POST tests into separate describe blocks - Fix Jest timers with beforeEach/afterEach hooks - Use specific version tag for GitHub Actions (security best practice)
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Summary
Added 10 new in-depth Node.js interview questions covering advanced topics that were missing from the existing collection.
New Questions Added
Changes
.mdfiles insrc/data/question-groups/nodejs/content/Testing