Challenge - 5 Problems
NestJS Scaffolding Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ component_behavior
intermediate2:00remaining
What is the default folder created for controllers in a new NestJS project?
When you create a new NestJS project using the CLI, which folder is automatically created to hold controller files?
Attempts:
2 left
💡 Hint
Think about where the CLI places files that handle incoming requests.
✗ Incorrect
The NestJS CLI creates a 'src' folder by default to organize controller files that handle HTTP requests.
📝 Syntax
intermediate2:00remaining
Which command scaffolds a new NestJS project with npm?
Choose the correct command to create a new NestJS project named 'my-app' using npm.
Attempts:
2 left
💡 Hint
The NestJS CLI uses a simple 'nest' command.
✗ Incorrect
The correct command is 'nest new my-app' which uses the Nest CLI to scaffold a new project.
🔧 Debug
advanced2:00remaining
What error occurs if you run 'nest new' without Node.js installed?
If you try to scaffold a new NestJS project using 'nest new project-name' but Node.js is not installed, what error will you see?
Attempts:
2 left
💡 Hint
If Node.js is missing, the CLI command itself won't run.
✗ Incorrect
Without Node.js, the system cannot recognize the 'nest' command, resulting in 'Command 'nest' not found'.
❓ state_output
advanced2:00remaining
After scaffolding, what file contains the main application bootstrap code?
In a freshly created NestJS project, which file contains the code that starts the application?
Attempts:
2 left
💡 Hint
Look for the file that calls 'NestFactory.create()'.
✗ Incorrect
The 'src/main.ts' file contains the bootstrap function that starts the NestJS application.
🧠 Conceptual
expert3:00remaining
Which option best describes the purpose of the 'app.module.ts' file in NestJS scaffolding?
What is the main role of the 'app.module.ts' file created by the NestJS CLI in a new project?
Attempts:
2 left
💡 Hint
Think about how NestJS groups features and services.
✗ Incorrect
The 'app.module.ts' file defines the root module that groups controllers, providers, and imports to organize the app structure.