0
0
NestJSframework~10 mins

Project scaffolding in NestJS - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a new NestJS project using the CLI.

NestJS
nest [1] my-nest-app
Drag options to blanks, or click blank then click option'
Abuild
Bnew
Cstart
Dgenerate
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'start' instead of 'new' which runs the app instead of creating it.
Using 'build' which compiles code but does not create a project.
2fill in blank
medium

Complete the command to add a new module named 'users' to your NestJS project.

NestJS
nest [1] module users
Drag options to blanks, or click blank then click option'
Acreate
Bstart
Cbuild
Dgenerate
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'create' which is for new projects, not parts inside a project.
Using 'start' which runs the app instead of generating files.
3fill in blank
hard

Fix the error in the command to generate a controller named 'auth'.

NestJS
nest generate [1] auth
Drag options to blanks, or click blank then click option'
Acontroller
Bservice
Cmodule
Dapp
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'service' which generates a service, not a controller.
Using 'module' which generates a module, not a controller.
4fill in blank
hard

Fill both blanks to generate a service named 'payment' inside the 'orders' module.

NestJS
nest generate [1] payment --module [2]
Drag options to blanks, or click blank then click option'
Aservice
Bcontroller
Corders
Dusers
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'controller' instead of 'service' for the first blank.
Using the wrong module name in the second blank.
5fill in blank
hard

Fill all three blanks to generate a controller named 'profile' with a spec file inside the 'users' module.

NestJS
nest generate [1] profile --module [2] --[3]
Drag options to blanks, or click blank then click option'
Acontroller
Busers
Cspec
Dservice
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'service' instead of 'controller' for the first blank.
Forgetting to specify the module name.
Omitting the '--spec' flag to generate test files.