Web/NestJS4 Module Module The @module() decorator provides metadata that Nest makes use of to organize the application structure. 일반적으로 모듈이라고 하면 조그만 클래스나 함수처럼 한 가지 일만 수행하는 소프트웨어 컴포넌트가 아니라 여러 컴포넌트를 조합하여 좀 더 큰 작업을 수행할 수 있게 하는 단위를 말한다. The @Module() decorator takes a single object whose properties describe the module: providers the providers that will be instantiated by the Nest injector and that may be shared at lea.. Web/NestJS 2024. 2. 22. Provider Provider Providers are a fundamental concept in Nest. Many of the basic Nest classes may be treated as a provider - services, repositories, factories, helpers, and so on. The main idea of a procider is that it can be injected as a dependency; this means objects can create various relationships with each other, and the function of "wiring up" these objects can largely be delegated to the Nest run.. Web/NestJS 2024. 2. 20. Exploring EcmaScript Decorators An ES2016 decorator is an expression which returns a function and can take a target, name and property descriptor as arguments. You apply it by prefixing the decorator with an @ character and placing this at the very top of what you are trying to decorate. Decorators can be defined for either a class, a method or a property. Param decorators Nest provides a set of useful param decorators that yo.. Web/NestJS 2024. 2. 15. Controllers Controllers Controllers are responsible for handling incoming requests and returning responses to the client. A controller's purpose is to receive specific requests for the application. The routing mechanism controls which controller receives which requests. Frequently, each controller has more than one route, and different routes can perform different actions. In order to create a basic control.. Web/NestJS 2024. 2. 15. 이전 1 다음