Careeroza
Setup and First App
Install the Nest CLI and Create a Project
You need Node.js 20 or later. Install the CLI globally and create a new project:
Example
npm i -g @nestjs/cli
nest new shopease-api
cd shopease-api
npm run start:devExample output
? Which package manager would you ❤️ to use? npm
✔ Installation in progress... ☕
🚀 Successfully created project shopease-api
[Nest] 18432 - 15/01/2026, 10:00:00 LOG [NestFactory] Starting Nest application...
[Nest] 18432 - 15/01/2026, 10:00:00 LOG [InstanceLoader] AppModule dependencies initialized +12ms
[Nest] 18432 - 15/01/2026, 10:00:00 LOG [RoutesResolver] AppController {/}: +4ms
[Nest] 18432 - 15/01/2026, 10:00:00 LOG [RouterExplorer] Mapped {/, GET} route +3ms
[Nest] 18432 - 15/01/2026, 10:00:00 LOG [NestApplication] Nest application successfully started +2msCall the Default Endpoint
Example
curl -i http://localhost:3000/Example output
HTTP/1.1 200 OK X-Powered-By: Express Content-Type: text/html; charset=utf-8 Content-Length: 12 Hello World!
| Script | What it does |
|---|---|
npm run start | Compile and run once |
npm run start:dev | Watch mode: restarts when you save a file |
npm run build | Compile TypeScript to dist/ |
npm run start:prod | Run node dist/main (production) |
npm test / npm run test:e2e | Unit tests / end-to-end tests with Jest |