Jul 15, 2024
npm install -g @nestjs/cli
to install NestJS CLInest new project-name
npm run start:dev
main.ts
, app.module.ts
, app.controller.ts
, app.service.ts
npm run start:dev
@nestjs/cli
, nestjs
, express
, typescript
nest new spotify-clone
nest g module songs
, nest g controller songs --no-spec
, nest g service songs
@Get()
, @Post()
in controllersnpm install @nestjs/typeorm @nestjs/config pg typeorm
TypeOrmModule
in app.module.ts
@Entity()
, @Column()
findAll
, findOne
, create
, update
, delete
.spec.ts
files for unit tests with Jest@nestjs/jwt
for token-based authenticationbcrypt
for password hashing@nestjs/graphql
and Apollo Server@nestjs/websockets
and Socket.IO@nestjs/config
References: