전체 글
-
[Nest.js] 6 - DTO & PIPESNest.js 2021. 9. 9. 13:03
Contents 1. DTO? Mapped-Type? 2. Pipes? 3. Binding Pipes 4. Built-in 8 Pipes 5. Custom Pipe 1. DTO? - Data Transfer Object - Mostly, to use in Controllers to validate request objects(e.g., data inputs from client) - When Client requests and receives data with Server, we need regulations for data type, name, and so on. -> Nest supports that those data automatically convert to class, which is call..
-
[Nest.js] 5 - TypeORM / MySql(MariaDB)Nest.js 2021. 9. 8. 19:03
Contents 1. TypeORM? 2. TypeORM vs Pure Javascript 3. Why use TypeORM 4. Install modules 5. Create Configuration file 6. Register config file to Root Module 1. TypeORM? - ORM(Object Relational Mapping) -> Automatically Mapping work between Object and RDB(Relational DataBase) -> it has an advantage for changes in object and DB - It available in the Node.js world - Written in TypeScript - We(devel..
-
[Nest.js] 4 - ProviderNest.js 2021. 9. 8. 15:41
Contents 1. Provider? 2. Dependency Injection 3. Service? 4. Create Service 1. Provider - Many of the basic classes may be treated as Provider -> Services, Repotories, Factories, Helpers, and so on. - Controllers should handle HTTP requests and responses. - Provider should be assigned more complex tasks from Controller. - Providers are plain JavaScript classes that are declared as providers in a..
-
[Nest.js] 3 - ControllerNest.js 2021. 9. 8. 12:45
Contents 1. Controller? 2. Route? 3. Request 4. Response 5. Create Controller 1. Controller? - 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. 2. Routing? - The Routing mechanism controls which controller receives which requests. - Each Controller has more than one rout..
-
[Nest.js] 2 - ModuleNest.js 2021. 9. 7. 18:41
Constent 1. Module? 2. Module structure 3. Create Module 1. Module? - Module is a class made by @Module() decorator - It provides metadata to Nest to build application structure - Each application has one or more modules, and root module is defined when application created main.ts import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; async function bootstrap() { c..
-
[Nest.js] 1 - Basic StructureNest.js 2021. 9. 7. 18:14
Content 1. Structure 1. Structure src : consist of business logics main.ts : create application and run import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; async function bootstrap() { const app = await NestFactory.create(AppModule); // AppModule is Root await app.listen(3000); } bootstrap(); app.module.ts : define app module, it roles as a root module which co..
-
[Nest.js] 0 - Nest.js ?Nest.js 2021. 9. 7. 15:41
Contents 1 - Introduction 2 - Philosophy 3 - Installation 1. Introduction Nest(Nest.js) is a framework for building efficient, scalable Node.js server-side applications. Nest is built with and fully supports TypeScript Nest combines elements of OOP(Object Oriented Programming), FP(Functional Programming), and FRP(Functional Reactive Programming). Nest makes use of robust HTTP Server framework li..
-
0. Node.js?Node.js 2021. 9. 6. 17:05
Contents 1. what is node.js? 2. why use node.js? 3. node.js frameworks and tools 1. What is Node.js? - Node.js is an open-source, cross-platform, single threaded ,back-end JavaScript runtime environment that runs on the Chrome *V8 engine and executes JavaScript code outside a web browser. *V8 : complies JavaScript directly to native machine code - Compared to Java 2. Why use Node.js? - Node.js u..