1/4
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
What are key advantages of using Nest.js compared to Express.js in large-scale applications?
Nest.js provides a modular architecture with dependency injection, TypeScript support, built-in testing tools, and structured organization (controllers, services, modules). This helps with scalability and maintainability in enterprise-grade apps.
How does Node.js handle concurrency (ability of a system to execute multiple computations simultaneously or in overlapping time periods) given its single-threaded nature?
Node.js uses an event-driven, non-blocking I/O model powered by the event loop and libuv, allowing it to handle thousands of concurrent requests efficiently via callbacks, promises, or async/await.
What’s the difference between REST and GraphQL APIs?
REST exposes fixed endpoints and returns predefined data, while GraphQL allows clients to query only the data they need through a single endpoint, improving efficiency and flexibility in modern frontends.
How would you handle error management in an Express/Nest.js application?
Use centralized error handling middleware, define custom error classes, log with tools like Winston, and send sanitized error messages to clients. Nest.js provides built-in Exception Filters for structured handling.
What are some common MySQL vs. MongoDB use cases?
Use MySQL for structured, relational data with ACID guarantees (e.g., transactions). MongoDB fits unstructured or flexible data models like documents and nested objects where scalability and speed are priorities.