Please enable JavaScript.
Coggle requires JavaScript to display documents.
NestJS - Coggle Diagram
NestJS
Providers
By decorator
Injectable
Is Dependency Injection
Plain Values, Classes and Factories
Provided for a module to be use
Define on Providers Array on Module Definition
Can be Exported
Can be a Service
Is Singleton
Pipes
Validation
ParseInt
Custom
Injectable()
Implements PipeTransform
transform(value, metadata)
Using in Handle Method
Global define in app.useGlobalPipes()
Using with DTO's
Controllers
Handlers
Can be bind on route
Http verbs Decorator
Recieve Request
Processs Request
Return Response
CLI
nest g module <name>
nest g controller <path> <--options>
nest g service <path> <--options>
Services
Bussiness Logic
Decorated with
Injectable
Prefer factories to build models
Decorators
controller
get
post
put
delete
Injectable
Data
Models
Can be Classes or Interfaces
DTO
Modules
Decorators Properties
providers
controllers
exports
imports
Dependency Injection
Defined on Constructor Class