{"id":41092,"date":"2024-11-06T02:46:33","date_gmt":"2024-11-06T02:46:33","guid":{"rendered":"https:\/\/atmokpo.com\/w\/?p=41092"},"modified":"2024-11-26T06:37:36","modified_gmt":"2024-11-26T06:37:36","slug":"10-nest-js%eb%a1%9c-restful-api-%ea%b5%ac%ec%b6%95%ed%95%98%ea%b8%b0-%eb%b8%94%eb%a1%9c%ea%b7%b8-api%ec%9d%98-%ea%b8%b0%eb%b3%b8-%ec%97%94%eb%93%9c%ed%8f%ac%ec%9d%b8%ed%8a%b8-%ec%84%a4%ec%a0%95","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/41092\/","title":{"rendered":"10.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8 \uc124\uc815\ud558\uae30 (CRUD)"},"content":{"rendered":"<p><body><\/p>\n<p>\n    Nest.js\ub294 \ud604\ub300\uc801\uc778 \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uac1c\ubc1c\uc744 \uc704\ud55c \uac15\ub825\ud55c \ud504\ub808\uc784\uc6cc\ud06c\ub85c, TypeScript\ub85c \uc791\uc131\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4. Nest.js\ub294 \ub2e4\uc591\ud55c \uc544\ud0a4\ud14d\ucc98\uc640 \ub514\uc790\uc778 \ud328\ud134\uc744 \uc9c0\uc6d0\ud558\uba70, \ud2b9\ud788 RESTful API \uad6c\ucd95\uc5d0 \uc720\uc6a9\ud569\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 Nest.js\ub97c \uc0ac\uc6a9\ud558\uc5ec \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8\ub97c \uc124\uc815\ud558\uace0, CRUD(Create, Read, Update, Delete) \uc791\uc5c5\uc744 \uad6c\ud604\ud558\ub294 \uacfc\uc815\uc744 \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.\n<\/p>\n<h2>1. Nest.js \uc18c\uac1c<\/h2>\n<p>\n    Nest.js\ub294 Angular\uc5d0\uc11c \uc601\uac10\uc744 \ubc1b\uc544 \ub9cc\ub4e4\uc5b4\uc9c4 Node.js\uc758 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ubaa8\ub4c8\ud654, \uc758\uc874\uc131 \uc8fc\uc785(DI), \uadf8\ub9ac\uace0 \uc720\uc5f0\ud55c \uad6c\uc870\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4. Nest.js\ub294 Express.js\ub97c \uae30\ubc18\uc73c\ub85c \ud558\uba70, \ub2e4\uc591\ud55c \ub77c\uc774\ube0c\ub7ec\ub9ac\uc640 \ubbf8\ub4e4\uc6e8\uc5b4\ub97c \ud65c\uc6a9\ud558\uc5ec \uac15\ub825\ud55c API \uc11c\ubc84\ub97c \uad6c\ucd95\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n<\/p>\n<h2>2. Nest.js \uc124\uce58 \ubc0f \ud504\ub85c\uc81d\ud2b8 \uc0dd\uc131<\/h2>\n<p>\n    Nest.js\ub97c \uc0ac\uc6a9\ud558\uae30 \uc704\ud574 \uba3c\uc800 Nest CLI\ub97c \uc124\uce58\ud558\uace0, \uc0c8\ub85c\uc6b4 \ud504\ub85c\uc81d\ud2b8\ub97c \uc0dd\uc131\ud574\uc57c \ud569\ub2c8\ub2e4. Nest CLI\ub294 Nest.js \ud504\ub85c\uc81d\ud2b8\ub97c \ube60\ub974\uac8c \uc0dd\uc131\ud558\uace0 \uad00\ub9ac\ud560 \uc218 \uc788\ub294 \ub3c4\uad6c\uc785\ub2c8\ub2e4.\n<\/p>\n<pre><code>npm install -g @nestjs\/cli\nnest new blog-api\n<\/code><\/pre>\n<p>\n    \uba85\ub839\uc5b4\ub97c \uc785\ub825\ud558\uba74, \uc0c8\ub85c\uc6b4 \ub514\ub809\ud130\ub9ac\uac00 \uc0dd\uc131\ub418\uace0 \uad00\ub828 \ud30c\uc77c\uacfc \uc885\uc18d\uc131\uc774 \uc124\uce58\ub429\ub2c8\ub2e4. \ud504\ub85c\uc81d\ud2b8 \ub514\ub809\ud130\ub9ac\ub85c \uc774\ub3d9\ud558\uc5ec \uc11c\ubc84\ub97c \uc2e4\ud589\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n<\/p>\n<pre><code>cd blog-api\nnpm run start\n<\/code><\/pre>\n<h2>3. \ube14\ub85c\uadf8 API \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8 \uc124\uacc4<\/h2>\n<p>\n    \ube14\ub85c\uadf8 API\ub294 \uc5ec\ub7ec \uac1c\uc758 \uc5d4\ub4dc\ud3ec\uc778\ud2b8\ub97c \ud1b5\ud574 \ube14\ub85c\uadf8 \uac8c\uc2dc\ubb3c\uc744 \uad00\ub9ac\ud569\ub2c8\ub2e4. \uae30\ubcf8\uc801\uc778 CRUD \uc791\uc5c5\uc744 \uc704\ud55c \uc5d4\ub4dc\ud3ec\uc778\ud2b8\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.\n<\/p>\n<ul>\n<li>GET \/posts: \ubaa8\ub4e0 \uac8c\uc2dc\ubb3c \uc870\ud68c<\/li>\n<li>GET \/posts\/:id: \ud2b9\uc815 \uac8c\uc2dc\ubb3c \uc870\ud68c<\/li>\n<li>POST \/posts: \uc0c8\ub85c\uc6b4 \uac8c\uc2dc\ubb3c \uc0dd\uc131<\/li>\n<li>PUT \/posts\/:id: \uac8c\uc2dc\ubb3c \uc218\uc815<\/li>\n<li>DELETE \/posts\/:id: \uac8c\uc2dc\ubb3c \uc0ad\uc81c<\/li>\n<\/ul>\n<h2>4. \uac8c\uc2dc\ubb3c \ubaa8\ub4c8 \uc0dd\uc131<\/h2>\n<p>\n    Nest.js\uc758 \ubaa8\ub4c8 \uc2dc\uc2a4\ud15c\uc744 \uc774\uc6a9\ud558\uc5ec \uac8c\uc2dc\ubb3c \ubaa8\ub4c8\uc744 \uc0dd\uc131\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc544\ub798 \uba85\ub839\uc5b4\ub97c \uc785\ub825\ud558\uc5ec \uac8c\uc2dc\ubb3c \ubaa8\ub4c8\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4.\n<\/p>\n<pre><code>nest generate module posts\nnest generate controller posts\nnest generate service posts\n<\/code><\/pre>\n<p>\n    \uc704 \uba85\ub839\uc5b4\ub97c \ud1b5\ud574 posts\ub77c\ub294 \uc774\ub984\uc758 \ubaa8\ub4c8, \ucee8\ud2b8\ub864\ub7ec, \uc11c\ube44\uc2a4\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4. \uc0dd\uc131\ub41c \ud30c\uc77c\ub4e4\uc740 <code>src\/posts<\/code> \ub514\ub809\ud130\ub9ac \uc548\uc5d0 \uc704\uce58\ud558\uac8c \ub429\ub2c8\ub2e4.\n<\/p>\n<h2>5. \uac8c\uc2dc\ubb3c DTO(Data Transfer Object) \uc815\uc758<\/h2>\n<p>\n    \uac8c\uc2dc\ubb3c \ub370\uc774\ud130\uc758 \ud615\uc2dd\uc744 \uc815\uc758\ud558\uae30 \uc704\ud574 DTO\ub97c \uc124\uc815\ud569\ub2c8\ub2e4. DTO\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8\uc640\uc758 \ub370\uc774\ud130 \uad50\ud658\uc744 \uc704\ud55c \uac1d\uccb4\ub85c, \ub370\uc774\ud130\uc758 \uc720\ud6a8\uc131\uc744 \uac80\uc0ac\ud558\ub294 \ub370\ub3c4 \uc0ac\uc6a9\ub429\ub2c8\ub2e4. \ub2e4\uc74c\uacfc \uac19\uc740 \uac8c\uc2dc\ubb3c DTO\ub97c \uc815\uc758\ud558\uaca0\uc2b5\ub2c8\ub2e4.\n<\/p>\n<pre><code>import { IsNotEmpty, IsString } from 'class-validator';\n\nexport class CreatePostDto {\n    @IsNotEmpty()\n    @IsString()\n    readonly title: string;\n\n    @IsNotEmpty()\n    @IsString()\n    readonly content: string;\n}\n<\/code><\/pre>\n<h2>6. \uac8c\uc2dc\ubb3c \uc11c\ube44\uc2a4 \uad6c\ud604<\/h2>\n<p>\n    \uac8c\uc2dc\ubb3c \uc11c\ube44\uc2a4\ub97c \uc0ac\uc6a9\ud558\uc5ec \ub370\uc774\ud130\uc758 \ube44\uc988\ub2c8\uc2a4 \ub85c\uc9c1\uc744 \uad00\ub9ac\ud569\ub2c8\ub2e4. \uc11c\ube44\uc2a4\ub294 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc640\uc758 \uc0c1\ud638\uc791\uc6a9, \ub370\uc774\ud130 \ucc98\ub9ac \ub4f1\uc744 \ub2f4\ub2f9\ud569\ub2c8\ub2e4. \ub2e4\uc74c\uc740 \uac04\ub2e8\ud55c \uac8c\uc2dc\ubb3c \uc11c\ube44\uc2a4 \ucf54\ub4dc\uc785\ub2c8\ub2e4.\n<\/p>\n<pre><code>import { Injectable, NotFoundException } from '@nestjs\/common';\nimport { CreatePostDto } from '.\/dto\/create-post.dto';\n\n@Injectable()\nexport class PostsService {\n    private posts = [];\n\n    create(createPostDto: CreatePostDto) {\n        const newPost = {\n            id: this.posts.length + 1,\n            ...createPostDto,\n        };\n        this.posts.push(newPost);\n        return newPost;\n    }\n\n    findAll() {\n        return this.posts;\n    }\n\n    findOne(id: number) {\n        const post = this.posts.find(p =&gt; p.id === id);\n        if (!post) {\n            throw new NotFoundException(`Post with ID ${id} not found`);\n        }\n        return post;\n    }\n\n    update(id: number, updatePostDto: CreatePostDto) {\n        const postIndex = this.posts.findIndex(p =&gt; p.id === id);\n        if (postIndex === -1) {\n            throw new NotFoundException(`Post with ID ${id} not found`);\n        }\n        this.posts[postIndex] = { id, ...updatePostDto };\n        return this.posts[postIndex];\n    }\n\n    delete(id: number) {\n        const postIndex = this.posts.findIndex(p =&gt; p.id === id);\n        if (postIndex === -1) {\n            throw new NotFoundException(`Post with ID ${id} not found`);\n        }\n        this.posts.splice(postIndex, 1);\n        return { message: 'Post deleted successfully' };\n    }\n}\n<\/code><\/pre>\n<h2>7. \uac8c\uc2dc\ubb3c \ucee8\ud2b8\ub864\ub7ec \uad6c\ud604<\/h2>\n<p>\n    \ub9c8\uc9c0\ub9c9\uc73c\ub85c, HTTP \uc694\uccad\uc744 \ucc98\ub9ac\ud558\ub294 \uac8c\uc2dc\ubb3c \ucee8\ud2b8\ub864\ub7ec\ub97c \uad6c\ud604\ud569\ub2c8\ub2e4. \uac01 \uc5d4\ub4dc\ud3ec\uc778\ud2b8\uc5d0 \ud574\ub2f9\ud558\ub294 \uba54\uc18c\ub4dc\ub97c \uc815\uc758\ud558\uc5ec \uc694\uccad\uc744 \ucc98\ub9ac\ud569\ub2c8\ub2e4.\n<\/p>\n<pre><code>import { Controller, Get, Post, Body, Param, Put, Delete } from '@nestjs\/common';\nimport { PostsService } from '.\/posts.service';\nimport { CreatePostDto } from '.\/dto\/create-post.dto';\n\n@Controller('posts')\nexport class PostsController {\n    constructor(private readonly postsService: PostsService) {}\n\n    @Post()\n    create(@Body() createPostDto: CreatePostDto) {\n        return this.postsService.create(createPostDto);\n    }\n\n    @Get()\n    findAll() {\n        return this.postsService.findAll();\n    }\n\n    @Get(':id')\n    findOne(@Param('id') id: string) {\n        return this.postsService.findOne(+id);\n    }\n\n    @Put(':id')\n    update(@Param('id') id: string, @Body() updatePostDto: CreatePostDto) {\n        return this.postsService.update(+id, updatePostDto);\n    }\n\n    @Delete(':id')\n    delete(@Param('id') id: string) {\n        return this.postsService.delete(+id);\n    }\n}\n<\/code><\/pre>\n<h2>8. API \ud14c\uc2a4\ud2b8<\/h2>\n<p>\n    API\ub97c \ud14c\uc2a4\ud2b8\ud558\uae30 \uc704\ud574 Postman \ub610\ub294 Insomnia\uc640 \uac19\uc740 API \ud074\ub77c\uc774\uc5b8\ud2b8\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc544\ub798\ub294 \uac01 \uc5d4\ub4dc\ud3ec\uc778\ud2b8\ub97c \ud14c\uc2a4\ud2b8\ud558\uae30 \uc704\ud55c \ubc29\ubc95\uc785\ub2c8\ub2e4.\n<\/p>\n<ul>\n<li><strong>POST \/posts<\/strong>: \uc0c8 \uac8c\uc2dc\ubb3c \uc0dd\uc131<\/li>\n<li><strong>GET \/posts<\/strong>: \ubaa8\ub4e0 \uac8c\uc2dc\ubb3c \uc870\ud68c<\/li>\n<li><strong>GET \/posts\/:id<\/strong>: \ud2b9\uc815 \uac8c\uc2dc\ubb3c \uc870\ud68c<\/li>\n<li><strong>PUT \/posts\/:id<\/strong>: \uac8c\uc2dc\ubb3c \uc5c5\ub370\uc774\ud2b8<\/li>\n<li><strong>DELETE \/posts\/:id<\/strong>: \uac8c\uc2dc\ubb3c \uc0ad\uc81c<\/li>\n<\/ul>\n<h3>8.1 \uc0c8 \uac8c\uc2dc\ubb3c \uc0dd\uc131 \uc608\uc81c<\/h3>\n<pre><code>POST \/posts\nContent-Type: application\/json\n\n{\n    \"title\": \"\uccab \ubc88\uc9f8 \uac8c\uc2dc\ubb3c\",\n    \"content\": \"\uc774\uac83\uc740 \uccab \ubc88\uc9f8 \uac8c\uc2dc\ubb3c\uc758 \ub0b4\uc6a9\uc785\ub2c8\ub2e4.\"\n}\n<\/code><\/pre>\n<h3>8.2 \ubaa8\ub4e0 \uac8c\uc2dc\ubb3c \uc870\ud68c \uc608\uc81c<\/h3>\n<pre><code>GET \/posts\n<\/code><\/pre>\n<h3>8.3 \ud2b9\uc815 \uac8c\uc2dc\ubb3c \uc870\ud68c \uc608\uc81c<\/h3>\n<pre><code>GET \/posts\/1\n<\/code><\/pre>\n<h3>8.4 \uac8c\uc2dc\ubb3c \uc218\uc815 \uc608\uc81c<\/h3>\n<pre><code>PUT \/posts\/1\nContent-Type: application\/json\n\n{\n    \"title\": \"\uc218\uc815\ub41c \uac8c\uc2dc\ubb3c \uc81c\ubaa9\",\n    \"content\": \"\uc218\uc815\ub41c \ub0b4\uc6a9\uc785\ub2c8\ub2e4.\"\n}\n<\/code><\/pre>\n<h3>8.5 \uac8c\uc2dc\ubb3c \uc0ad\uc81c \uc608\uc81c<\/h3>\n<pre><code>DELETE \/posts\/1\n<\/code><\/pre>\n<h2>9. \uacb0\ub860<\/h2>\n<p>\n    \uc774\ubc88 \uae00\uc5d0\uc11c\ub294 Nest.js\ub97c \uc0ac\uc6a9\ud558\uc5ec \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 CRUD \uc5d4\ub4dc\ud3ec\uc778\ud2b8\ub97c \uc0dd\uc131\ud558\ub294 \ubc29\ubc95\uc744 \uc0b4\ud3b4\ubcf4\uc558\uc2b5\ub2c8\ub2e4. Nest.js\ub294 \uc9c1\uad00\uc801\uc774\uace0 \uc720\uc5f0\ud55c API \uac1c\ubc1c\uc744 \uac00\ub2a5\ud558\uac8c \ud558\uba70, \uac04\uacb0\ud558\uace0 \uc720\uc9c0\ubcf4\uc218\ud558\uae30 \uc26c\uc6b4 \ucf54\ub4dc\ub97c \uc791\uc131\ud560 \uc218 \uc788\uac8c \ub3c4\uc640\uc90d\ub2c8\ub2e4. \uc774\uc81c \uc5ec\ub7ec\ubd84\uc740 Nest.js\ub97c \ud65c\uc6a9\ud558\uc5ec \uc790\uc2e0\uc758 \uc694\uad6c\uc5d0 \ub9de\ub294 API\ub97c \uc644\uc131\ud574\ubcf4\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4.\n<\/p>\n<h2>10. \ub2e4\uc74c \ub2e8\uacc4<\/h2>\n<p>\n    \uc774 \ud29c\ud1a0\ub9ac\uc5bc\uc744 \ub9c8\uce5c \ud6c4, \ub2e4\uc74c \ub2e8\uacc4\ub85c\ub294 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc640\uc758 \uc5f0\ub3d9\uc744 \ucd94\uac00\ud558\uc5ec \uc601\uc18d\uc131\uc744 \uc81c\uacf5\ud558\ub294 \ubc29\ubc95\uc744 \ubd84\uc11d\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. TypeORM \ub610\ub294 Sequelize\uc640 \uac19\uc740 ORM \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc0ac\uc6a9\ud558\uc5ec \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0 \uc800\uc7a5\ud558\uace0 \uad00\ub9ac\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \ubc30\uc6b0\ub294 \uac83\ub3c4 \ucd94\ucc9c\ud569\ub2c8\ub2e4.\n<\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nest.js\ub294 \ud604\ub300\uc801\uc778 \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uac1c\ubc1c\uc744 \uc704\ud55c \uac15\ub825\ud55c \ud504\ub808\uc784\uc6cc\ud06c\ub85c, TypeScript\ub85c \uc791\uc131\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4. Nest.js\ub294 \ub2e4\uc591\ud55c \uc544\ud0a4\ud14d\ucc98\uc640 \ub514\uc790\uc778 \ud328\ud134\uc744 \uc9c0\uc6d0\ud558\uba70, \ud2b9\ud788 RESTful API \uad6c\ucd95\uc5d0 \uc720\uc6a9\ud569\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 Nest.js\ub97c \uc0ac\uc6a9\ud558\uc5ec \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8\ub97c \uc124\uc815\ud558\uace0, CRUD(Create, Read, Update, Delete) \uc791\uc5c5\uc744 \uad6c\ud604\ud558\ub294 \uacfc\uc815\uc744 \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. 1. Nest.js \uc18c\uac1c Nest.js\ub294 Angular\uc5d0\uc11c \uc601\uac10\uc744 \ubc1b\uc544 \ub9cc\ub4e4\uc5b4\uc9c4 Node.js\uc758 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ubaa8\ub4c8\ud654, \uc758\uc874\uc131 \uc8fc\uc785(DI), \uadf8\ub9ac\uace0 \uc720\uc5f0\ud55c \uad6c\uc870\ub97c &hellip; <a href=\"https:\/\/atmokpo.com\/w\/41092\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;10.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8 \uc124\uc815\ud558\uae30 (CRUD)&#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-41092","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>10.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8 \uc124\uc815\ud558\uae30 (CRUD) - \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\/41092\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"10.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8 \uc124\uc815\ud558\uae30 (CRUD) - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"Nest.js\ub294 \ud604\ub300\uc801\uc778 \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uac1c\ubc1c\uc744 \uc704\ud55c \uac15\ub825\ud55c \ud504\ub808\uc784\uc6cc\ud06c\ub85c, TypeScript\ub85c \uc791\uc131\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4. Nest.js\ub294 \ub2e4\uc591\ud55c \uc544\ud0a4\ud14d\ucc98\uc640 \ub514\uc790\uc778 \ud328\ud134\uc744 \uc9c0\uc6d0\ud558\uba70, \ud2b9\ud788 RESTful API \uad6c\ucd95\uc5d0 \uc720\uc6a9\ud569\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 Nest.js\ub97c \uc0ac\uc6a9\ud558\uc5ec \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8\ub97c \uc124\uc815\ud558\uace0, CRUD(Create, Read, Update, Delete) \uc791\uc5c5\uc744 \uad6c\ud604\ud558\ub294 \uacfc\uc815\uc744 \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. 1. Nest.js \uc18c\uac1c Nest.js\ub294 Angular\uc5d0\uc11c \uc601\uac10\uc744 \ubc1b\uc544 \ub9cc\ub4e4\uc5b4\uc9c4 Node.js\uc758 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ubaa8\ub4c8\ud654, \uc758\uc874\uc131 \uc8fc\uc785(DI), \uadf8\ub9ac\uace0 \uc720\uc5f0\ud55c \uad6c\uc870\ub97c &hellip; \ub354 \ubcf4\uae30 &quot;10.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8 \uc124\uc815\ud558\uae30 (CRUD)&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/41092\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-06T02:46:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T06:37:36+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\/41092\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/41092\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"10.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8 \uc124\uc815\ud558\uae30 (CRUD)\",\"datePublished\":\"2024-11-06T02:46:33+00:00\",\"dateModified\":\"2024-11-26T06:37:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/41092\/\"},\"wordCount\":102,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"nextjs\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/41092\/\",\"url\":\"https:\/\/atmokpo.com\/w\/41092\/\",\"name\":\"10.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8 \uc124\uc815\ud558\uae30 (CRUD) - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-06T02:46:33+00:00\",\"dateModified\":\"2024-11-26T06:37:36+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/41092\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/41092\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/41092\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"10.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8 \uc124\uc815\ud558\uae30 (CRUD)\"}]},{\"@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":"10.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8 \uc124\uc815\ud558\uae30 (CRUD) - \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\/41092\/","og_locale":"ko_KR","og_type":"article","og_title":"10.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8 \uc124\uc815\ud558\uae30 (CRUD) - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"Nest.js\ub294 \ud604\ub300\uc801\uc778 \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uac1c\ubc1c\uc744 \uc704\ud55c \uac15\ub825\ud55c \ud504\ub808\uc784\uc6cc\ud06c\ub85c, TypeScript\ub85c \uc791\uc131\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4. Nest.js\ub294 \ub2e4\uc591\ud55c \uc544\ud0a4\ud14d\ucc98\uc640 \ub514\uc790\uc778 \ud328\ud134\uc744 \uc9c0\uc6d0\ud558\uba70, \ud2b9\ud788 RESTful API \uad6c\ucd95\uc5d0 \uc720\uc6a9\ud569\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 Nest.js\ub97c \uc0ac\uc6a9\ud558\uc5ec \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8\ub97c \uc124\uc815\ud558\uace0, CRUD(Create, Read, Update, Delete) \uc791\uc5c5\uc744 \uad6c\ud604\ud558\ub294 \uacfc\uc815\uc744 \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. 1. Nest.js \uc18c\uac1c Nest.js\ub294 Angular\uc5d0\uc11c \uc601\uac10\uc744 \ubc1b\uc544 \ub9cc\ub4e4\uc5b4\uc9c4 Node.js\uc758 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ubaa8\ub4c8\ud654, \uc758\uc874\uc131 \uc8fc\uc785(DI), \uadf8\ub9ac\uace0 \uc720\uc5f0\ud55c \uad6c\uc870\ub97c &hellip; \ub354 \ubcf4\uae30 \"10.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8 \uc124\uc815\ud558\uae30 (CRUD)\"","og_url":"https:\/\/atmokpo.com\/w\/41092\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-06T02:46:33+00:00","article_modified_time":"2024-11-26T06:37:36+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\/41092\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/41092\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"10.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8 \uc124\uc815\ud558\uae30 (CRUD)","datePublished":"2024-11-06T02:46:33+00:00","dateModified":"2024-11-26T06:37:36+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/41092\/"},"wordCount":102,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["nextjs"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/41092\/","url":"https:\/\/atmokpo.com\/w\/41092\/","name":"10.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8 \uc124\uc815\ud558\uae30 (CRUD) - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-06T02:46:33+00:00","dateModified":"2024-11-26T06:37:36+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/41092\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/41092\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/41092\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"10.Nest.js\ub85c RESTful API \uad6c\ucd95\ud558\uae30, \ube14\ub85c\uadf8 API\uc758 \uae30\ubcf8 \uc5d4\ub4dc\ud3ec\uc778\ud2b8 \uc124\uc815\ud558\uae30 (CRUD)"}]},{"@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\/41092","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=41092"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/41092\/revisions"}],"predecessor-version":[{"id":41093,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/41092\/revisions\/41093"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=41092"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=41092"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=41092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}