
NestJS Fundamentals
Modules, Controllers, Providers, Dependency Injection, Decorators, CLI
1Which decorator is used to define a controller in NestJS?
Which decorator is used to define a controller in NestJS?
คำตอบ
The @Controller() decorator marks a class as a controller and optionally accepts a route prefix. Controllers handle incoming HTTP requests and return responses to the client. They use decorators like @Get(), @Post() to define routes.
2What is a provider in NestJS?
What is a provider in NestJS?
คำตอบ
A provider is a class that can be injected as a dependency through NestJS's dependency injection system. Services, repositories, factories, and helpers are providers. They are annotated with @Injectable() and declared in a module's providers array.
3How to create a new NestJS project with the CLI?
How to create a new NestJS project with the CLI?
คำตอบ
The 'nest new project-name' command creates a new NestJS project with a standard structure including src/, test/, and configuration files. The CLI prompts to choose the package manager (npm, yarn, pnpm) and automatically generates initial code with the root module and a basic controller.
What is the role of the @Injectable() decorator?
In NestJS, how to inject a service into a controller?
+20 คำถามสัมภาษณ์
หัวข้อสัมภาษณ์ Node.js / NestJS อื่นๆ
Node.js Fundamentals
Node.js Core APIs
Asynchronous Programming
Express.js Basics
REST API Design
Validation & DTO
API Documentation & Contracts
Error Handling
Unit Testing
Task Scheduling
NestJS Modules & DI
Configuration & Environment Management
JWT Authentication
Authorization & RBAC
Database with TypeORM
Prisma ORM
Middleware & Interceptors
File Upload
WebSockets
GraphQL with NestJS
End-to-End Testing
Caching with Redis
Queues with Bull
DevOps, Logging & CI/CD
Docker & Containerization
Microservices
Security Best Practices
Performance & Cloud Deployment
เชี่ยวชาญ Node.js / NestJS สำหรับการสัมภาษณ์ครั้งถัดไป
เข้าถึงคำถามทั้งหมด flashcards แบบทดสอบเทคนิค แบบฝึกหัด code review และตัวจำลองสัมภาษณ์
เริ่มใช้ฟรี