Question 1: What is NestJS?
- A frontend framework
- A backend framework for Node.js
- A database
- A testing library
Explanation: NestJS is a backend framework built on top of Node.js.
This beginner-level NestJS quiz is designed for developers starting with NestJS framework. It covers core fundamentals such as modules, controllers, services, decorators, dependency injection, and basic architecture—perfect for practice and entry-level backend interviews.
Explanation: NestJS is a backend framework built on top of Node.js.
Explanation: NestJS is written in TypeScript.
Explanation: NestJS follows the MVC-inspired architecture.
Explanation: NestJS is an open-source framework created by Kamil Myśliwiec.
Explanation: nest new creates a new NestJS project.
Explanation: Modules group related controllers and providers.
Explanation: @Module() defines a NestJS module.
Explanation: AppModule is the root module.
Explanation: Controllers handle incoming HTTP requests.
Explanation: @Controller() marks a class as a controller.
Explanation: Services contain reusable business logic.
Explanation: @Injectable() marks a class as a provider.
Explanation: Dependency injection provides required class dependencies.
Explanation: main.ts bootstraps the NestJS app.
Explanation: NestJS uses Express by default.
Explanation: @Get() handles HTTP GET requests.
Explanation: @Post() handles HTTP POST requests.
Explanation: @Param() extracts route parameters.
Explanation: @Body() extracts request body.
Explanation: @Query() extracts query parameters.
Explanation: Middleware runs before request reaches controller.
Explanation: NestMiddleware is used to define middleware.
Explanation: Providers are injectable classes.
Explanation: NestJS does not have a built-in public decorator by default.
Explanation: Pipes are used for validation and transformation.
Explanation: ValidationPipe validates request data.
Explanation: Guards handle authorization logic.
Explanation: Interceptors can modify responses.
Explanation: Exception filters handle and format errors.
Explanation: HttpException is used to throw HTTP errors.
Explanation: package.json manages dependencies.
Explanation: npm start runs the NestJS app.
Explanation: NestJS runs on port 3000 by default.
Explanation: @Inject() explicitly injects dependencies.
Explanation: @UseGuards() applies guards.
Explanation: @UsePipes() applies pipes.
Explanation: Modules support modular architecture.
Explanation: Controllers and decorators define REST APIs.
Explanation: nest generate controller creates a controller.
Explanation: nest generate service creates a service.
Explanation: nest-cli.json configures the CLI.
Explanation: NestJS provides a scalable backend architecture.
Explanation: Dependency injection improves testability.
Explanation: NestJS is designed for scalable backend applications.
This beginner-level NestJS quiz is designed for developers starting with NestJS framework. It covers core fundamentals such as modules, controllers, services, decorators, dependency injection, and basic architecture—perfect for practice and entry-level backend interviews.