0
0
NestJSframework~15 mins

NestJS CLI installation - Mini Project: Build & Apply

Choose your learning style9 modes available
NestJS CLI Installation
📖 Scenario: You want to create a new backend project using NestJS, a popular Node.js framework. To start, you need to install the NestJS Command Line Interface (CLI) globally on your computer. This CLI helps you create and manage NestJS projects easily.
🎯 Goal: Install the NestJS CLI globally using npm so you can create new NestJS projects from the command line.
📋 What You'll Learn
Use npm to install the NestJS CLI globally
Verify the installation by checking the CLI version
Use the exact command npm install -g @nestjs/cli
Use the exact command nest --version to check the version
💡 Why This Matters
🌍 Real World
Developers use the NestJS CLI to quickly set up backend projects with best practices and ready-to-use configurations.
💼 Career
Knowing how to install and use the NestJS CLI is essential for backend developers working with Node.js and NestJS frameworks.
Progress0 / 4 steps
1
Install NestJS CLI globally
Type the exact command npm install -g @nestjs/cli in your terminal to install the NestJS CLI globally on your computer.
NestJS
Need a hint?

Use npm with the -g flag to install the package globally.

2
Verify NestJS CLI installation
Type the exact command nest --version in your terminal to check if the NestJS CLI installed correctly and to see its version number.
NestJS
Need a hint?

Use the nest command followed by --version to check the installed CLI version.

3
Create a new NestJS project
Use the exact command nest new my-app to create a new NestJS project folder named my-app.
NestJS
Need a hint?

Use nest new followed by the project name to create a new project.

4
Navigate into the new project folder
Type the exact command cd my-app to change your terminal directory into the new project folder my-app.
NestJS
Need a hint?

Use cd followed by the folder name to enter the project directory.