{"id":41044,"date":"2024-11-06T02:46:24","date_gmt":"2024-11-06T02:46:24","guid":{"rendered":"https:\/\/atmokpo.com\/w\/?p=41044"},"modified":"2024-11-26T06:37:43","modified_gmt":"2024-11-26T06:37:43","slug":"12-nest-js%eb%a1%9c-restful-api-%ea%b5%ac%ec%b6%95%ed%95%98%ea%b8%b0-%ea%b2%8c%ec%8b%9c%ea%b8%80-%ec%83%9d%ec%84%b1-%ec%88%98%ec%a0%95-%ec%82%ad%ec%a0%9c-%ec%a1%b0%ed%9a%8c-api-%ea%b5%ac%ed%98%84","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/41044\/","title":{"rendered":"12.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \uac8c\uc2dc\uae00 \uc0dd\uc131, \uc218\uc815, \uc0ad\uc81c, \uc870\ud68c API \uad6c\ud604"},"content":{"rendered":"<p><body><\/p>\n<article>\n<p>\uc624\ub298\uc740 Nest.js\ub97c \uc0ac\uc6a9\ud558\uc5ec RESTful API\ub97c \uad6c\ucd95\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. RESTful API\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8\uc640 \uc11c\ubc84 \uac04\uc758 \uc0c1\ud638\uc791\uc6a9\uc744 \ud6a8\uc728\uc801\uc73c\ub85c \ucc98\ub9ac\ud558\uae30 \uc704\ud574 \uc124\uacc4\ub41c \uc544\ud0a4\ud14d\ucc98 \uc2a4\ud0c0\uc77c\uc785\ub2c8\ub2e4. \ub370\uc774\ud130\uc758 \uc0dd\uc131, \uac80\uc0c9, \uc5c5\ub370\uc774\ud2b8 \ubc0f \uc0ad\uc81c(CRUD)\ub97c \uc704\ud55c \uc9c1\uad00\uc801\uc778 \ubc29\ubc95\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4.<\/p>\n<h2>1. Nest.js\ub780?<\/h2>\n<p>Nest.js\ub294 Node.js\ub97c \uae30\ubc18\uc73c\ub85c \ud55c \ud6a8\uc728\uc801\uc774\uace0 \uc2e0\ub8b0\ud560 \uc218 \uc788\ub294 \uc11c\ubc84 \uc0ac\uc774\ub4dc \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ud504\ub808\uc784\uc6cc\ud06c\uc785\ub2c8\ub2e4. TypeScript\ub85c \uc791\uc131\ub418\uc5c8\uc73c\uba70, Angular\uc5d0\uc11c \uc601\ud5a5\uc744 \ub9ce\uc774 \ubc1b\uc544 \ubaa8\ub4c8\ud654, IoC(\uc81c\uc5b4\uc758 \uc5ed\uc804), \ub370\ucf54\ub808\uc774\ud130 \uae30\ubc18 \ud504\ub85c\uadf8\ub798\ubc0d\uacfc \uac19\uc740 \ud2b9\uc9d5\uc744 \uac00\uc9c0\uace0 \uc788\uc2b5\ub2c8\ub2e4. Nest.js\ub294 \ubcf5\uc7a1\ud55c \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uc27d\uac8c \uad6c\uc870\ud654\ud558\uace0 \uad00\ub9ac\ud560 \uc218 \uc788\uac8c \ub3c4\uc640\uc90d\ub2c8\ub2e4.<\/p>\n<h2>2. \uac1c\ubc1c \ud658\uacbd \uc124\uc815\ud558\uae30<\/h2>\n<h3>2.1 Node.js \ubc0f Nest CLI \uc124\uce58<\/h3>\n<p>\uba3c\uc800, Node.js\uac00 \uc124\uce58\ub418\uc5b4 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4. Node.js\uac00 \uc124\uce58\ub418\uc5b4 \uc788\uc9c0 \uc54a\ub2e4\uba74, [Node.js \uacf5\uc2dd \uc0ac\uc774\ud2b8](https:\/\/nodejs.org)\uc5d0\uc11c \ub2e4\uc6b4\ub85c\ub4dc\ud558\uc5ec \uc124\uce58\ud569\ub2c8\ub2e4. \uadf8 \ud6c4, Nest CLI\ub97c \uc124\uce58\ud569\ub2c8\ub2e4.<\/p>\n<pre><code>npm install -g @nestjs\/cli<\/code><\/pre>\n<h3>2.2 \uc0c8\ub85c\uc6b4 Nest \ud504\ub85c\uc81d\ud2b8 \uc0dd\uc131<\/h3>\n<p>\uc774\uc81c Nest CLI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc0c8\ub85c\uc6b4 \ud504\ub85c\uc81d\ud2b8\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4. \ub2e4\uc74c \uba85\ub839\uc5b4\ub97c \uc785\ub825\ud569\ub2c8\ub2e4.<\/p>\n<pre><code>nest new blog-api<\/code><\/pre>\n<p>\ud504\ub85c\uc81d\ud2b8 \ub514\ub809\ud1a0\ub9ac\ub85c \uc774\ub3d9\ud569\ub2c8\ub2e4.<\/p>\n<pre><code>cd blog-api<\/code><\/pre>\n<h2>3. \uac8c\uc2dc\uae00\uc744 \uc704\ud55c \ubaa8\ub4c8, \uc11c\ube44\uc2a4 \ubc0f \ucee8\ud2b8\ub864\ub7ec \uc0dd\uc131\ud558\uae30<\/h2>\n<h3>3.1 \uac8c\uc2dc\uae00 \ubaa8\ub4c8 \uc0dd\uc131<\/h3>\n<p>\uac8c\uc2dc\uae00\uacfc \uad00\ub828\ub41c \ubaa8\ub4e0 \ub0b4\uc6a9\uc744 \ucc98\ub9ac\ud558\uae30 \uc704\ud574 \uac8c\uc2dc\uae00 \ubaa8\ub4c8\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4.<\/p>\n<pre><code>nest generate module posts<\/code><\/pre>\n<h3>3.2 \uac8c\uc2dc\uae00 \uc11c\ube44\uc2a4 \uc0dd\uc131<\/h3>\n<p>\uc11c\ube44\uc2a4\ub294 \ube44\uc988\ub2c8\uc2a4 \ub85c\uc9c1\uc744 \ucc98\ub9ac\ud558\ub294 \ubd80\ubd84\uc785\ub2c8\ub2e4.<\/p>\n<pre><code>nest generate service posts<\/code><\/pre>\n<h3>3.3 \uac8c\uc2dc\uae00 \ucee8\ud2b8\ub864\ub7ec \uc0dd\uc131<\/h3>\n<p>\ucee8\ud2b8\ub864\ub7ec\ub294 HTTP \uc694\uccad\uc744 \ucc98\ub9ac\ud558\uace0 \ud074\ub77c\uc774\uc5b8\ud2b8\uc5d0\uac8c \uc751\ub2f5\ud558\ub294 \uc5ed\ud560\uc744 \ud569\ub2c8\ub2e4.<\/p>\n<pre><code>nest generate controller posts<\/code><\/pre>\n<h2>4. \uac8c\uc2dc\uae00 \uc0dd\uc131, \uc870\ud68c, \uc218\uc815, \uc0ad\uc81c API \uad6c\ud604\ud558\uae30<\/h2>\n<p>\uc774\uc81c \uac8c\uc2dc\uae00 API\uc758 \uac01 \uae30\ub2a5\uc744 \uad6c\ud604\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uac01 \ubd80\ubd84\uc740 \uc11c\ube44\uc2a4\uc640 \ucee8\ud2b8\ub864\ub7ec\ub97c \uacb0\ud569\ud558\uc5ec \ucc98\ub9ac\ub429\ub2c8\ub2e4.<\/p>\n<h3>4.1 \uac8c\uc2dc\uae00 \ubaa8\ub378 \uc815\uc758\ud558\uae30<\/h3>\n<p>\uac8c\uc2dc\uae00\uc758 \uad6c\uc870\ub97c \uc815\uc758\ud558\uae30 \uc704\ud574 DTO(Data Transfer Object)\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4. src\/posts\/dto\/create-post.dto.ts \ud30c\uc77c\uc744 \uc0dd\uc131\ud558\uace0 \ub2e4\uc74c \ub0b4\uc6a9\uc744 \ucd94\uac00\ud569\ub2c8\ub2e4.<\/p>\n<pre><code>\nexport class CreatePostDto {\n    title: string;\n    content: string;\n}\n        <\/code><\/pre>\n<h3>4.2 \uac8c\uc2dc\uae00 \uc778\ud130\ud398\uc774\uc2a4 \uc815\uc758\ud558\uae30<\/h3>\n<p>\uac8c\uc2dc\uae00 \ub370\uc774\ud130 \uad6c\uc870\ub97c \uc815\uc758\ud558\uae30 \uc704\ud574 interfaces \ud30c\uc77c\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4. src\/posts\/interfaces\/post.interface.ts \ud30c\uc77c\uc744 \uc0dd\uc131\ud558\uace0 \ub2e4\uc74c \ub0b4\uc6a9\uc744 \ucd94\uac00\ud569\ub2c8\ub2e4.<\/p>\n<pre><code>\nexport interface Post {\n    id: number;\n    title: string;\n    content: string;\n}\n        <\/code><\/pre>\n<h3>4.3 \uc11c\ube44\uc2a4 \ucf54\ub4dc \uad6c\ud604\ud558\uae30<\/h3>\n<p>src\/posts\/posts.service.ts \ud30c\uc77c\uc744 \uc5f4\uace0, \uac8c\uc2dc\uae00\uc744 \uad00\ub9ac\ud558\ub294 \ucf54\ub4dc\ub97c \uc791\uc131\ud569\ub2c8\ub2e4.<\/p>\n<pre><code>\nimport { Injectable } from '@nestjs\/common';\nimport { Post } from '.\/interfaces\/post.interface';\nimport { CreatePostDto } from '.\/dto\/create-post.dto';\n\n@Injectable()\nexport class PostsService {\n    private readonly posts: Post[] = [];\n    private idCounter = 1;\n\n    create(createPostDto: CreatePostDto): Post {\n        const newPost = {\n            id: this.idCounter++,\n            ...createPostDto,\n        };\n        this.posts.push(newPost);\n        return newPost;\n    }\n\n    findAll(): Post[] {\n        return this.posts;\n    }\n\n    findOne(id: number): Post {\n        return this.posts.find(post =&gt; post.id === id);\n    }\n\n    update(id: number, updatePostDto: CreatePostDto): Post {\n        const post = this.findOne(id);\n        if (post) {\n            post.title = updatePostDto.title;\n            post.content = updatePostDto.content;\n        }\n        return post;\n    }\n\n    delete(id: number): void {\n        const index = this.posts.findIndex(post =&gt; post.id === id);\n        if (index !== -1) {\n            this.posts.splice(index, 1);\n        }\n    }\n}\n        <\/code><\/pre>\n<h3>4.4 \ucee8\ud2b8\ub864\ub7ec \ucf54\ub4dc \uad6c\ud604\ud558\uae30<\/h3>\n<p>src\/posts\/posts.controller.ts \ud30c\uc77c\uc744 \uc5f4\uace0, API \uc694\uccad\uc744 \ucc98\ub9ac\ud558\ub294 \ucf54\ub4dc\ub97c \uc791\uc131\ud569\ub2c8\ub2e4.<\/p>\n<pre><code>\nimport { Controller, Get, Post, Body, Param, Put, Delete } from '@nestjs\/common';\nimport { PostsService } from '.\/posts.service';\nimport { CreatePostDto } from '.\/dto\/create-post.dto';\nimport { Post as PostInterface } from '.\/interfaces\/post.interface';\n\n@Controller('posts')\nexport class PostsController {\n    constructor(private readonly postsService: PostsService) {}\n\n    @Post()\n    create(@Body() createPostDto: CreatePostDto): PostInterface {\n        return this.postsService.create(createPostDto);\n    }\n\n    @Get()\n    findAll(): PostInterface[] {\n        return this.postsService.findAll();\n    }\n\n    @Get(':id')\n    findOne(@Param('id') id: number): PostInterface {\n        return this.postsService.findOne(id);\n    }\n\n    @Put(':id')\n    update(@Param('id') id: number, @Body() updatePostDto: CreatePostDto): PostInterface {\n        return this.postsService.update(id, updatePostDto);\n    }\n\n    @Delete(':id')\n    delete(@Param('id') id: number): void {\n        this.postsService.delete(id);\n    }\n}\n        <\/code><\/pre>\n<h2>5. Nest.js \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uc2e4\ud589\ud558\uae30<\/h2>\n<p>\ubaa8\ub4e0 \ucf54\ub4dc\uac00 \uc791\uc131\ub418\uc5c8\uc73c\uba74, \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uc2e4\ud589\uc2dc\ucf1c\ubd05\ub2c8\ub2e4. \ub2e4\uc74c \uba85\ub839\uc5b4\ub97c \uc785\ub825\ud558\uc5ec \uc11c\ubc84\ub97c \uc2e4\ud589\ud569\ub2c8\ub2e4.<\/p>\n<pre><code>npm run start<\/code><\/pre>\n<p>\ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c <strong>http:\/\/localhost:3000\/posts<\/strong>\ub97c \uc5f4\uba74 \uac8c\uc2dc\uae00 API\uc5d0 \uc811\uadfc\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>6. API \ud14c\uc2a4\ud2b8 \uc0ac\uc6a9\ud558\uae30<\/h2>\n<p>Postman\uacfc \uac19\uc740 API \ud14c\uc2a4\ud2b8 \ub3c4\uad6c\ub97c \uc0ac\uc6a9\ud558\uc5ec \ub2e4\uc591\ud55c API \uc694\uccad\uc744 \ud14c\uc2a4\ud2b8\ud569\ub2c8\ub2e4. CRUD \uae30\ub2a5\uc744 \uac00\uc9c0\uace0 \uc785\ub825\ud55c \ub370\uc774\ud130\ub97c \ud655\uc778\ud574\ubcf4\uc138\uc694.<\/p>\n<h2>7. \ub9c8\ubb34\ub9ac<\/h2>\n<p>\uc774 \uae00\uc5d0\uc11c\ub294 Nest.js\ub97c \uc0ac\uc6a9\ud558\uc5ec \uac8c\uc2dc\uae00 \uc0dd\uc131\uc744 \uc704\ud55c RESTful API\ub97c \uad6c\ucd95\ud558\ub294 \uacfc\uc815\uc744 \uc0b4\ud3b4\ubcf4\uc558\uc2b5\ub2c8\ub2e4. Nest.js\uc758 \ubaa8\ub4c8, \uc11c\ube44\uc2a4, \ucee8\ud2b8\ub864\ub7ec\ub97c \uc774\uc6a9\ud558\uc5ec RESTful API\ub97c \ud6a8\uc728\uc801\uc73c\ub85c \uad6c\uc131\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774 \uad6c\uc870\ub97c \uae30\ubc18\uc73c\ub85c \ub354 \ubcf5\uc7a1\ud55c \ube44\uc988\ub2c8\uc2a4 \ub85c\uc9c1\uc774\ub098 \ub2e4\uc591\ud55c \uae30\ub2a5\uc744 \ucd94\uac00\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\ud2b9\ud788 Nest.js\uc758 \uad6c\uc870\uc801\uc778 \uc811\uadfc \ubc29\uc2dd\uc740 \ucf54\ub4dc\uc758 \uc720\uc9c0\ubcf4\uc218\uc131\uc744 \ub192\uc774\uba70, \ud2b9\ud788 \ub300\uaddc\ubaa8 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c \uadf8 \uc9c4\uac00\ub97c \ubc1c\ud718\ud569\ub2c8\ub2e4. \ucd94\uac00\ub85c, Nest.js\ub294 GraphQL, WebSocket, Microservices \ub4f1 \ub2e4\uc591\ud55c \uc18c\ud504\ud2b8\uc6e8\uc5b4 \ub514\uc790\uc778 \ud328\ud134\uc744 \uc9c0\uc6d0\ud558\ubbc0\ub85c \ud544\uc694\uc5d0 \ub530\ub77c \ud655\uc7a5\ud560 \uc218 \uc788\ub294 \uc720\uc5f0\uc131\uc774 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\uc774\uc81c \uc5ec\ub7ec\ubd84\ub3c4 Nest.js\ub85c RESTful API\ub97c \uad6c\ucd95\ud560 \uc218 \uc788\ub294 \uae30\ucd08\ub97c \ub2e4\uc84c\uc2b5\ub2c8\ub2e4. \uc55e\uc73c\ub85c \ub354 \ub9ce\uc740 \uae30\ub2a5\uacfc \ubc29\ubc95\ub860\uc744 \ud0d0\uad6c\ud574\ubcf4\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4. \uac10\uc0ac\ud569\ub2c8\ub2e4!<\/p>\n<\/article>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc624\ub298\uc740 Nest.js\ub97c \uc0ac\uc6a9\ud558\uc5ec RESTful API\ub97c \uad6c\ucd95\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. RESTful API\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8\uc640 \uc11c\ubc84 \uac04\uc758 \uc0c1\ud638\uc791\uc6a9\uc744 \ud6a8\uc728\uc801\uc73c\ub85c \ucc98\ub9ac\ud558\uae30 \uc704\ud574 \uc124\uacc4\ub41c \uc544\ud0a4\ud14d\ucc98 \uc2a4\ud0c0\uc77c\uc785\ub2c8\ub2e4. \ub370\uc774\ud130\uc758 \uc0dd\uc131, \uac80\uc0c9, \uc5c5\ub370\uc774\ud2b8 \ubc0f \uc0ad\uc81c(CRUD)\ub97c \uc704\ud55c \uc9c1\uad00\uc801\uc778 \ubc29\ubc95\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. 1. Nest.js\ub780? Nest.js\ub294 Node.js\ub97c \uae30\ubc18\uc73c\ub85c \ud55c \ud6a8\uc728\uc801\uc774\uace0 \uc2e0\ub8b0\ud560 \uc218 \uc788\ub294 \uc11c\ubc84 \uc0ac\uc774\ub4dc \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ud504\ub808\uc784\uc6cc\ud06c\uc785\ub2c8\ub2e4. TypeScript\ub85c \uc791\uc131\ub418\uc5c8\uc73c\uba70, Angular\uc5d0\uc11c \uc601\ud5a5\uc744 \ub9ce\uc774 \ubc1b\uc544 \ubaa8\ub4c8\ud654, IoC(\uc81c\uc5b4\uc758 \uc5ed\uc804), &hellip; <a href=\"https:\/\/atmokpo.com\/w\/41044\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;12.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \uac8c\uc2dc\uae00 \uc0dd\uc131, \uc218\uc815, \uc0ad\uc81c, \uc870\ud68c API \uad6c\ud604&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[223],"tags":[],"class_list":["post-41044","post","type-post","status-publish","format-standard","hentry","category-nextjs"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>12.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \uac8c\uc2dc\uae00 \uc0dd\uc131, \uc218\uc815, \uc0ad\uc81c, \uc870\ud68c API \uad6c\ud604 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/atmokpo.com\/w\/41044\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"12.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \uac8c\uc2dc\uae00 \uc0dd\uc131, \uc218\uc815, \uc0ad\uc81c, \uc870\ud68c API \uad6c\ud604 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"\uc624\ub298\uc740 Nest.js\ub97c \uc0ac\uc6a9\ud558\uc5ec RESTful API\ub97c \uad6c\ucd95\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. RESTful API\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8\uc640 \uc11c\ubc84 \uac04\uc758 \uc0c1\ud638\uc791\uc6a9\uc744 \ud6a8\uc728\uc801\uc73c\ub85c \ucc98\ub9ac\ud558\uae30 \uc704\ud574 \uc124\uacc4\ub41c \uc544\ud0a4\ud14d\ucc98 \uc2a4\ud0c0\uc77c\uc785\ub2c8\ub2e4. \ub370\uc774\ud130\uc758 \uc0dd\uc131, \uac80\uc0c9, \uc5c5\ub370\uc774\ud2b8 \ubc0f \uc0ad\uc81c(CRUD)\ub97c \uc704\ud55c \uc9c1\uad00\uc801\uc778 \ubc29\ubc95\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. 1. Nest.js\ub780? Nest.js\ub294 Node.js\ub97c \uae30\ubc18\uc73c\ub85c \ud55c \ud6a8\uc728\uc801\uc774\uace0 \uc2e0\ub8b0\ud560 \uc218 \uc788\ub294 \uc11c\ubc84 \uc0ac\uc774\ub4dc \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ud504\ub808\uc784\uc6cc\ud06c\uc785\ub2c8\ub2e4. TypeScript\ub85c \uc791\uc131\ub418\uc5c8\uc73c\uba70, Angular\uc5d0\uc11c \uc601\ud5a5\uc744 \ub9ce\uc774 \ubc1b\uc544 \ubaa8\ub4c8\ud654, IoC(\uc81c\uc5b4\uc758 \uc5ed\uc804), &hellip; \ub354 \ubcf4\uae30 &quot;12.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \uac8c\uc2dc\uae00 \uc0dd\uc131, \uc218\uc815, \uc0ad\uc81c, \uc870\ud68c API \uad6c\ud604&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/41044\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-06T02:46:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T06:37:43+00:00\" \/>\n<meta name=\"author\" content=\"root\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:site\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"root\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"2\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/41044\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/41044\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"12.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \uac8c\uc2dc\uae00 \uc0dd\uc131, \uc218\uc815, \uc0ad\uc81c, \uc870\ud68c API \uad6c\ud604\",\"datePublished\":\"2024-11-06T02:46:24+00:00\",\"dateModified\":\"2024-11-26T06:37:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/41044\/\"},\"wordCount\":102,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"nextjs\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/41044\/\",\"url\":\"https:\/\/atmokpo.com\/w\/41044\/\",\"name\":\"12.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \uac8c\uc2dc\uae00 \uc0dd\uc131, \uc218\uc815, \uc0ad\uc81c, \uc870\ud68c API \uad6c\ud604 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-06T02:46:24+00:00\",\"dateModified\":\"2024-11-26T06:37:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/41044\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/41044\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/41044\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"12.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \uac8c\uc2dc\uae00 \uc0dd\uc131, \uc218\uc815, \uc0ad\uc81c, \uc870\ud68c API \uad6c\ud604\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atmokpo.com\/w\/#website\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atmokpo.com\/w\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"contentUrl\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"width\":400,\"height\":400,\"caption\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\"},\"image\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/bebubo4\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\",\"name\":\"root\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"caption\":\"root\"},\"sameAs\":[\"http:\/\/atmokpo.com\/w\"],\"url\":\"https:\/\/atmokpo.com\/w\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"12.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \uac8c\uc2dc\uae00 \uc0dd\uc131, \uc218\uc815, \uc0ad\uc81c, \uc870\ud68c API \uad6c\ud604 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/atmokpo.com\/w\/41044\/","og_locale":"ko_KR","og_type":"article","og_title":"12.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \uac8c\uc2dc\uae00 \uc0dd\uc131, \uc218\uc815, \uc0ad\uc81c, \uc870\ud68c API \uad6c\ud604 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"\uc624\ub298\uc740 Nest.js\ub97c \uc0ac\uc6a9\ud558\uc5ec RESTful API\ub97c \uad6c\ucd95\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. RESTful API\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8\uc640 \uc11c\ubc84 \uac04\uc758 \uc0c1\ud638\uc791\uc6a9\uc744 \ud6a8\uc728\uc801\uc73c\ub85c \ucc98\ub9ac\ud558\uae30 \uc704\ud574 \uc124\uacc4\ub41c \uc544\ud0a4\ud14d\ucc98 \uc2a4\ud0c0\uc77c\uc785\ub2c8\ub2e4. \ub370\uc774\ud130\uc758 \uc0dd\uc131, \uac80\uc0c9, \uc5c5\ub370\uc774\ud2b8 \ubc0f \uc0ad\uc81c(CRUD)\ub97c \uc704\ud55c \uc9c1\uad00\uc801\uc778 \ubc29\ubc95\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. 1. Nest.js\ub780? Nest.js\ub294 Node.js\ub97c \uae30\ubc18\uc73c\ub85c \ud55c \ud6a8\uc728\uc801\uc774\uace0 \uc2e0\ub8b0\ud560 \uc218 \uc788\ub294 \uc11c\ubc84 \uc0ac\uc774\ub4dc \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ud504\ub808\uc784\uc6cc\ud06c\uc785\ub2c8\ub2e4. TypeScript\ub85c \uc791\uc131\ub418\uc5c8\uc73c\uba70, Angular\uc5d0\uc11c \uc601\ud5a5\uc744 \ub9ce\uc774 \ubc1b\uc544 \ubaa8\ub4c8\ud654, IoC(\uc81c\uc5b4\uc758 \uc5ed\uc804), &hellip; \ub354 \ubcf4\uae30 \"12.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \uac8c\uc2dc\uae00 \uc0dd\uc131, \uc218\uc815, \uc0ad\uc81c, \uc870\ud68c API \uad6c\ud604\"","og_url":"https:\/\/atmokpo.com\/w\/41044\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-06T02:46:24+00:00","article_modified_time":"2024-11-26T06:37:43+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"2\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/41044\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/41044\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"12.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \uac8c\uc2dc\uae00 \uc0dd\uc131, \uc218\uc815, \uc0ad\uc81c, \uc870\ud68c API \uad6c\ud604","datePublished":"2024-11-06T02:46:24+00:00","dateModified":"2024-11-26T06:37:43+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/41044\/"},"wordCount":102,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["nextjs"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/41044\/","url":"https:\/\/atmokpo.com\/w\/41044\/","name":"12.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \uac8c\uc2dc\uae00 \uc0dd\uc131, \uc218\uc815, \uc0ad\uc81c, \uc870\ud68c API \uad6c\ud604 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-06T02:46:24+00:00","dateModified":"2024-11-26T06:37:43+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/41044\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/41044\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/41044\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"12.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \uac8c\uc2dc\uae00 \uc0dd\uc131, \uc218\uc815, \uc0ad\uc81c, \uc870\ud68c API \uad6c\ud604"}]},{"@type":"WebSite","@id":"https:\/\/atmokpo.com\/w\/#website","url":"https:\/\/atmokpo.com\/w\/","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","description":"","publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atmokpo.com\/w\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/atmokpo.com\/w\/#organization","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","url":"https:\/\/atmokpo.com\/w\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/","url":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","contentUrl":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","width":400,"height":400,"caption":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8"},"image":{"@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/bebubo4"]},{"@type":"Person","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7","name":"root","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","caption":"root"},"sameAs":["http:\/\/atmokpo.com\/w"],"url":"https:\/\/atmokpo.com\/w\/author\/root\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/41044","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/comments?post=41044"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/41044\/revisions"}],"predecessor-version":[{"id":41045,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/41044\/revisions\/41045"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=41044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=41044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=41044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}