0
0
NestJSframework~20 mins

Project scaffolding in NestJS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
NestJS Scaffolding Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
component_behavior
intermediate
2: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?
Asrc/controllers
Bsrc/modules
Csrc
Dcrs
Attempts:
2 left
💡 Hint
Think about where the CLI places files that handle incoming requests.
📝 Syntax
intermediate
2: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.
Anestjs new my-app
Bnest new my-app
Cnpm create nest-app my-app
Dnpm init nest my-app
Attempts:
2 left
💡 Hint
The NestJS CLI uses a simple 'nest' command.
🔧 Debug
advanced
2: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?
ACommand 'nest' not found
BSyntaxError: Unexpected token
CError: Cannot find module 'nestjs'
DTypeError: nest is not a function
Attempts:
2 left
💡 Hint
If Node.js is missing, the CLI command itself won't run.
state_output
advanced
2: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?
Asrc/main.ts
Bsrc/app.module.ts
Csrc/server.js
Dsrc/index.ts
Attempts:
2 left
💡 Hint
Look for the file that calls 'NestFactory.create()'.
🧠 Conceptual
expert
3: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?
AIt manages database connections and ORM setup automatically
BIt contains the main server configuration and HTTP listener setup
CIt holds all the environment variables and configuration settings
DIt defines the root module that organizes controllers and providers for the app
Attempts:
2 left
💡 Hint
Think about how NestJS groups features and services.