Smells like Angular Spirit

NestJS

@ValentinKononov

Valentin Kononov

Full-Stack Developer

Speaker

@ValentinKononov

Agenda

@ValentinKononov

  • Intro about NestJS
  • Create a project
  • Walkthrough about controllers, modules, services
  • Adding repository
  • Application structure
  • Requests validation using pipes
  • Add Logging
  • Dependency Injection
  • Authentication with JWT tokens, roles
  • Swagger
  • Start and Test API

Intro. NestJS Philosophy

How it's connected to Angular?

AppModule.ts

@ValentinKononov

import { Module } from '@nestjs/common';

@Module({
  imports: [
    AuthModule,
    UserModule,
    MongooseModule.forRoot(
        'mongodb://localhost:27017/bundle-node-nest'),
    WinstonModule.forRoot({    }),
  ],
  exports: [...],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}

NestJS Framework Parts

out of the box

NestJS Framework Parts

@ValentinKononov

Modules

Controllers

Routing

Dependency Injection

Middleware

Pipes

Guards

Exceptions

Interceptors

Tune in NestJS

Dive into Code Samples

Slides

@ValentinKononov

  • https://docs.nestjs.com
 

Thanks!

See you again!

@ValentinKononov

Made with Slides.com