Nest.js
-
[Nest.js] Life Cycle - 2 GuardsNest.js 2021. 10. 7. 19:02
1. What is Guards? Guards are for protecting our server based on our rules "internally". What I mean is that we have to set up its own conditions, such as permissions, roles, etc.., in our project. Guards works on here for Authentication/Authorization !! Guard is designed to return True or False only. Why?, because there are no options need for authentication and authorization. 2. What Guards do..
-
[Nest.js] Life Cycle - 1 MiddlewareNest.js 2021. 10. 1. 14:48
1. What is Middleware? Nest.js documentation Middleware is a function which is called before the route handler. Middleware functions have access to the request and response objects, and the next() middleware function.Nest middleware are equivalent to Express middleware.Nest Middleware fully supports Dependency Injection. A middleware class implements NestMiddleware interface, and its abstract us..
-
[Nest.js] Life Cycle - advanced approachNest.js 2021. 9. 29. 15:12
Do we know why they are seperated into several components? Is it possible to implement within any component by ignoring their role? LET'S SEE MORE DETAILS OF Nest.js Life Cycle RIGHT NOWWWWWWW ! - Nest.js Life Cycle from request to response - Detail 1.Middleware Middleware is called only before the route handler is called. You have access to the response object, but you don't have the result of ..
-
[Nest.js] simple projectNest.js 2021. 9. 27. 18:15
will cover very basics of Nest.js from creating a project to Building REST API. Please make sure that we have installed 1. Node - v14.17.6 2. npm(Node Package Manager) - 7.20.3 3. Visual Studio Code 4. Postman (download link - https://www.postman.com/downloads/) or Insomnia (download link - https://insomnia.rest/download) STEP 1 - Install Nest.js 1.1 check node & npm version $ node -v $ npm -v 1..
-
[Nest.js] 16 - Log with Winston and WebHookNest.js 2021. 9. 25. 18:36
- last time in #14, we used built-in Logger in nestjs/common. However, we will use the external logger, which is Winston. - Nest's built-in logger is used for monitoring Nest system behavior, and can also be useful for basic formatted text logging in your feature modules while in development Constent 1. Winston? 2. Module Installation 3. Winston Logging Level 4. Winston Transports 5. Implementat..
-
[Nest.js] 15 - ConfigurationNest.js 2021. 9. 22. 02:25
Contents 1. Configuration? 2. Codebase vs Environment Variables 3. Module Installation 4. Configuration implementation 1. Configuration? - In our source code, some of codes that we have written may be affected by Application Environment, Development Environment, or be protected from others. - Therefore, we will deal with those code to save in much securer way, which is called Configuration File...
-
[Nest.js] 14 - Log basicNest.js 2021. 9. 17. 12:02
Contents 1. Log? 2. Types of Logging 3. Log Level Example 4. logging Implementation 1. Log? - When we run an application, we encount unexpected errors sometimes. - Therefore, to see logs is a fast and useful way to find where an error occurs. - It is a better way to put logs after every single implementation is done - Nest.js provides Logger class, which is built-in. 2. Types Of Logging - Log : ..
-
[Nest.js] 13 - Relations - One To One, Many To OneNest.js 2021. 9. 15. 19:02
Contents 1. Relations? 2. Relation Implementation on Board and User Entities 3. Eager Relations 4. Version-up CRUD(=> C) 5. Version-up CRUD(=> R) 6. Version-up CRUD(=> U) 7. Version-up CRUD(=> D) 1. Relations? - Relations helps us to work with related entities easily. - Relationships between entities are based on business logic or functional behaviors. 1. one-to-one using @OneToOne // A client c..