Рет қаралды 166
The video explains the concept of Pipe.
Pipe in Nest.js is executed just before the method of Controller Route Handler is executed. Most important point to note is that, it is executed on the arguments of the Controller Route Handler.
Pipe serves two main use cases:
1. Transformation: Transforms data from one form to another.
2. Validation: Let the data go through if valid otherwise throw exception.
One such example of Transformation is given where the argument of string is transformed to integer.