{"id":336373,"date":"2022-07-30T15:00:17","date_gmt":"2022-07-30T15:00:17","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=336373"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=336373","title":{"rendered":"<span>\u041f\u043e\u0447\u0435\u043c\u0443 \u044f \u043b\u044e\u0431\u043b\u044e \u0438 \u043d\u0435\u043d\u0430\u0432\u0438\u0436\u0443 NestJS?<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><a href=\"https:\/\/nestjs.com\/\" rel=\"noopener noreferrer nofollow\">NestJS<\/a> \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u043e\u0434 <a href=\"https:\/\/nodejs.org\/\" rel=\"noopener noreferrer nofollow\">Node.js<\/a>, \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u043c\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438 Spring, ASP.NET Core, Simfony.<\/p>\n<p>\u0422\u0430\u043a \u0447\u0442\u043e \u0436\u0435 \u0442\u0430\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0438 \u0443\u0436\u0430\u0441\u043d\u043e\u0433\u043e?<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/eac\/4e4\/20a\/eac4e420af22542176dc1d3fd86c2d1b.jpg\" width=\"1726\" height=\"1582\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/eac\/4e4\/20a\/eac4e420af22542176dc1d3fd86c2d1b.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u041e\u0441\u043d\u043e\u0432\u044b<\/h2>\n<p>\u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u044d\u0442\u0438\u043c \u0444\u0440\u0435\u0439\u043c\u043e\u0440\u043a\u043e\u043c, \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043e\u043d \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d \u043d\u0430 TypeScript, \u043d\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f babel \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0438 \u043d\u0430 JavaScript. \u042d\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0437\u0430\u0432\u044f\u0437\u0430\u043d\u0430 \u043d\u0430 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430\u0445.\u00a0 \u0412 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0435 \u043b\u0435\u0436\u0438\u0442 \u0432\u0437\u044f\u0442\u0430\u044f \u0438\u0437 <a href=\"https:\/\/angular.io\/\" rel=\"noopener noreferrer nofollow\">Angular 2+<\/a> \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u043c\u0438\u043c\u043e \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u0438 \u0435\u0449\u0451 \u0438 dependency injection. NestJs \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 HTTP \u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043e\u043d <a href=\"https:\/\/docs.nestjs.com\/techniques\/performance\" rel=\"noopener noreferrer nofollow\">\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e-\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c<\/a>, \u0442\u043e \u0435\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e HTTP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u043c\u0438 (\u0441\u0430\u043c NestJS \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c <a href=\"https:\/\/expressjs.com\/\" rel=\"noopener noreferrer nofollow\">Express<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/www.fastify.io\/\" rel=\"noopener noreferrer nofollow\">Fastify<\/a>). \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0438\u0434 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u0430: <a href=\"https:\/\/docs.nestjs.com\/microservices\/grpc\" rel=\"noopener noreferrer nofollow\">gRPC<\/a>, <a href=\"https:\/\/docs.nestjs.com\/microservices\/basics\" rel=\"noopener noreferrer nofollow\">TCP<\/a> \u0438\u043b\u0438 \u043e\u043f\u044f\u0442\u044c \u0442\u0430\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0430\u0434\u0430\u043f\u0442\u0435\u0440. \u0418\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c API \u0432\u043e\u043e\u0431\u0449\u0435: \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 (Cron), \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 (Redis, Kafka, RabbitMQ, NATS). \u0422\u0430\u043a\u0436\u0435 \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 <a href=\"https:\/\/docs.nestjs.com\/techniques\/database\" rel=\"noopener noreferrer nofollow\">ORM<\/a>: TypeORM, Sequelize, Prisma, Mongoose. \u0422\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044f \u044d\u0442\u0443 \u043a\u0443\u0447\u0443 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0439, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0446\u0438\u043a\u043b \u0441\u0442\u0430\u0442\u0435\u0439, \u0438\u0445 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0438 \u044f \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0451 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043b.<\/p>\n<h2>\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430<\/h2>\n<p>\u041a\u0430\u043a \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u043d\u0435\u0435, \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0432 NestJS &#8212; \u044d\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c. \u041c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043d\u0435\u043a\u0443\u044e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u0443\u044e \u0435\u0434\u0438\u043d\u0438\u0446\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043d\u0435\u043a\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u0430\u0448 API, \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0411\u0414, \u0434\u043e\u043c\u0435\u043d\u044b, \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u0442\u0434. \u041d\u043e \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 &#8212; \u044d\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043c\u043e\u0434\u0443\u043b\u044c. \u0412\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 DI-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0438 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044e\u0442\u0441\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 (Injectable services). \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0432\u0441\u0451 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u0432 Angular 2+ \u0437\u0430 \u0442\u0435\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c, \u0447\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code>components<\/code> \u0443 \u043d\u0430\u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>controllers<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u0434\u043b\u044f RESTful API, \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>providers<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u044b\/\u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432.\u00a0<\/p>\n<pre><code class=\"typescript\">import { Module } from '@nestjs\/common'; import { UserController } from '.\/user.controller'; import { UserService } from '.\/user.service';  @Module({   controllers: [UserController],   providers: [UserService],   exports: [UserService], }) export class UserModule {}<\/code><\/pre>\n<p>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b, \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 Spring. \u0421\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441, \u043f\u043e\u043c\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0443\u0436\u043d\u044b\u043c \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u043c (Controller, Handler, Injectable). \u041c\u0435\u0442\u043e\u0434\u044b \u043a\u043b\u0430\u0441\u0441\u0430 \u0442\u043e\u0436\u0435 \u043f\u043e\u043c\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438 (Get, Post, Put, Patch, Delete, Message \u0438 \u0442\u0434). \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440. \u0412 \u043e\u0431\u0449\u0435\u043c \u0432\u0441\u0451 \u043e\u0447\u0435\u043d\u044c \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e.<\/p>\n<pre><code class=\"typescript\">import { Injectable } from '@nestjs\/common'; import { User } from '.\/user.entity';  @Injectable() export class UserService {   private readonly users: User[] = [];    findAll(): User[] {     return this.users;   } }<\/code><\/pre>\n<pre><code class=\"typescript\">import { Controller, Get } from '@nestjs\/common'; import { User } from '.\/user.entity'; import { UserService } from '.\/user.service';  @Controller('users') export class UserController { constructor(   private readonly userService: UserService,   ) {}    @Get()   findAll(): User[] {     return userService.findAll();   } }<\/code><\/pre>\n<h2>\u0422\u0430\u043a \u043a\u0430\u043a\u0438\u0435 \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b?<\/h2>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0438 \u043d\u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043d\u0435 \u0432\u0438\u0434\u043d\u044b. \u041c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u043e\u0434\u0438\u043d \u043c\u043e\u0434\u0443\u043b\u044c, \u0432 \u043d\u0435\u0433\u043e \u0437\u0430\u043f\u0438\u0445\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0451 \u0438 \u0440\u0430\u0434\u0443\u0435\u043c\u0441\u044f \u0436\u0438\u0437\u043d\u0438. \u041d\u043e \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432, \u0437\u0430\u0447\u0435\u043c \u0438\u0445 \u043f\u0438\u0445\u0430\u0442\u044c \u0432 \u043e\u0434\u0438\u043d \u043c\u043e\u0434\u0443\u043b\u044c? \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e \u0434\u043e\u043c\u0435\u043d\u0430\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0438. \u0418 \u0432\u043e\u0442 \u0442\u0443\u0442 NestJS \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0435\u0431\u044f \u0432\u043e \u0432\u0441\u0435\u0439 \u043a\u0440\u0430\u0441\u0435.<\/p>\n<p>\u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u0438 \u0438\u043c\u0435\u044e\u0442 \u0441\u0432\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f DI? \u0414\u0430, \u043c\u0430\u043b\u043e \u043d\u0430\u043c npm \u0434\u043b\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u0443\u0442 \u0446\u0435\u043b\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 NestJS. \u0412\u0441\u0435\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0433\u0434\u0435 \u0438 \u043a\u0430\u043a \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0441\u0435\u0440\u0432\u0438\u0441 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0432 \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f. \u0410 \u0435\u0449\u0451 \u043c\u043e\u0434\u0443\u043b\u0438 \u0431\u044b\u0432\u0430\u044e\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0438 \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0438\u0437 \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0432\u043e\u043b\u0448\u0435\u0431\u043d\u043e\u043c\u0443 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0443 Inject, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0435\u0437\u0434\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u043c\u043e\u0434\u0443\u043b\u0435, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0432\u043e \u0432\u0441\u0435\u0445 \u043c\u043e\u0434\u0443\u043b\u044f\u0445, \u043d\u043e \u044d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043a\u043e\u0441\u0442\u044b\u043b\u044c, \u0447\u0435\u043c \u043d\u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041b\u0430\u0434\u043d\u043e, \u0430 \u0435\u0441\u043b\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438 \u043d\u0435 \u043f\u043e \u0434\u043e\u043c\u0435\u043d\u0430\u043c, \u0430 \u043f\u043e \u0441\u043b\u043e\u044f\u043c: domain, infrastructure, application, api, workers \u0438 \u0442.\u0434.? \u041c\u044b \u0441\u043d\u043e\u0432\u0430 \u043d\u0430\u0442\u044b\u043a\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u043d\u0436\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u044f infrastructure \u0432 \u043c\u043e\u0434\u0443\u043b\u044c application, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u044f\u0432\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c infrastructure \u043c\u043e\u0434\u0443\u043b\u044c \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 application, \u0438 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043c\u044b \u043b\u0438\u0448\u0430\u0435\u043c\u0441\u044f &#171;\u0447\u0438\u0441\u0442\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b&#187;. <\/p>\n<pre><code class=\"typescript\">import { Module } from '@nestjs\/common'; import { UserRepository } from '.\/repositories\/user.repository';  @Module({   providers: [UserRepository],   exports: [UserRepository], }) export class InfrastructureModule {}<\/code><\/pre>\n<pre><code class=\"typescript\">import { Module } from '@nestjs\/common'; import { InfrastructureModule } from '..\/infrastructure\/infrastructure.module'; import { UserService } from '.\/services\/user.service';  @Module({   imports: [InfrastructureModule],   providers: [UserService],   exports: [UserService], }) export class ApplicationModule {}<\/code><\/pre>\n<h2>\u0418\u0442\u043e\u0433\u0438<\/h2>\n<p>NestJS \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u043e\u0449\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f Enterprise-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041c\u043e\u0434\u0443\u043b\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430, \u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043b\u0438 \u043e\u043d\u043e \u0442\u043e\u0433\u043e, \u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u0430\u0434 \u0438\u0437-\u0437\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0440\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439? \u0412\u043e\u043f\u0440\u043e\u0441 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c, \u043d\u043e \u043b\u0438\u0447\u043d\u043e \u044f \u0437\u0430 \u044d\u0442\u043e \u043d\u0435\u043d\u0430\u0432\u0438\u0436\u0443 NestJS. \u0412\u0435\u0434\u044c \u0442\u043e\u0442 \u0436\u0435 Spring \u0438 ASP.NET Core \u0436\u0438\u0432\u0443\u0442 \u0438 \u0431\u0435\u0437 \u044d\u0442\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u043d\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0432\u0441\u0451 \u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u201c\u0447\u0438\u0441\u0442\u043e\u0439\u201d \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.\u00a0<\/p>\n<p>P.S. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0442\u0435 \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 \u043c\u043e\u0449\u043d\u044b\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c. \u0411\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <\/p>\n<div class=\"tm-article-poll\">\n<div class=\"tm-notice tm-article-poll__notice tm-notice_positive\"><!----> <\/p>\n<div class=\"tm-notice__inner\"><!----> <\/p>\n<div data-test-id=\"notice-content\" class=\"tm-notice__content\"><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/post\/679992\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__header\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043b\u0438 \u0432\u044b Nest.js \u0432 production?<\/div>\n<div class=\"tm-article-poll__answers\">\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">             55.56%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0414\u0430<\/span> <span class=\"tm-article-poll__answer-votes\">             15           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width:55.56%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             44.44%           <\/span> <span class=\"tm-article-poll__answer-label\">\u041d\u0435\u0442<\/span> <span class=\"tm-article-poll__answer-votes\">             12           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:44.44%;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__stats\">        \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 27 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.          \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 6 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.      <\/div>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/679992\/\"> https:\/\/habr.com\/ru\/post\/679992\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><a href=\"https:\/\/nestjs.com\/\" rel=\"noopener noreferrer nofollow\">NestJS<\/a> \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u043e\u0434 <a href=\"https:\/\/nodejs.org\/\" rel=\"noopener noreferrer nofollow\">Node.js<\/a>, \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u043c\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438 Spring, ASP.NET Core, Simfony.<\/p>\n<p>\u0422\u0430\u043a \u0447\u0442\u043e \u0436\u0435 \u0442\u0430\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0438 \u0443\u0436\u0430\u0441\u043d\u043e\u0433\u043e?<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u041e\u0441\u043d\u043e\u0432\u044b<\/h2>\n<p>\u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u044d\u0442\u0438\u043c \u0444\u0440\u0435\u0439\u043c\u043e\u0440\u043a\u043e\u043c, \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043e\u043d \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d \u043d\u0430 TypeScript, \u043d\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f babel \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0438 \u043d\u0430 JavaScript. \u042d\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0437\u0430\u0432\u044f\u0437\u0430\u043d\u0430 \u043d\u0430 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430\u0445.\u00a0 \u0412 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0435 \u043b\u0435\u0436\u0438\u0442 \u0432\u0437\u044f\u0442\u0430\u044f \u0438\u0437 <a href=\"https:\/\/angular.io\/\" rel=\"noopener noreferrer nofollow\">Angular 2+<\/a> \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u043c\u0438\u043c\u043e \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u0438 \u0435\u0449\u0451 \u0438 dependency injection. NestJs \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 HTTP \u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043e\u043d <a href=\"https:\/\/docs.nestjs.com\/techniques\/performance\" rel=\"noopener noreferrer nofollow\">\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e-\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c<\/a>, \u0442\u043e \u0435\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e HTTP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u043c\u0438 (\u0441\u0430\u043c NestJS \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c <a href=\"https:\/\/expressjs.com\/\" rel=\"noopener noreferrer nofollow\">Express<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/www.fastify.io\/\" rel=\"noopener noreferrer nofollow\">Fastify<\/a>). \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0438\u0434 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u0430: <a href=\"https:\/\/docs.nestjs.com\/microservices\/grpc\" rel=\"noopener noreferrer nofollow\">gRPC<\/a>, <a href=\"https:\/\/docs.nestjs.com\/microservices\/basics\" rel=\"noopener noreferrer nofollow\">TCP<\/a> \u0438\u043b\u0438 \u043e\u043f\u044f\u0442\u044c \u0442\u0430\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0430\u0434\u0430\u043f\u0442\u0435\u0440. \u0418\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c API \u0432\u043e\u043e\u0431\u0449\u0435: \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 (Cron), \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 (Redis, Kafka, RabbitMQ, NATS). \u0422\u0430\u043a\u0436\u0435 \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 <a href=\"https:\/\/docs.nestjs.com\/techniques\/database\" rel=\"noopener noreferrer nofollow\">ORM<\/a>: TypeORM, Sequelize, Prisma, Mongoose. \u0422\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044f \u044d\u0442\u0443 \u043a\u0443\u0447\u0443 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0439, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0446\u0438\u043a\u043b \u0441\u0442\u0430\u0442\u0435\u0439, \u0438\u0445 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0438 \u044f \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0451 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043b.<\/p>\n<h2>\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430<\/h2>\n<p>\u041a\u0430\u043a \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u043d\u0435\u0435, \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0432 NestJS &#8212; \u044d\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c. \u041c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043d\u0435\u043a\u0443\u044e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u0443\u044e \u0435\u0434\u0438\u043d\u0438\u0446\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043d\u0435\u043a\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u0430\u0448 API, \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0411\u0414, \u0434\u043e\u043c\u0435\u043d\u044b, \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u0442\u0434. \u041d\u043e \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 &#8212; \u044d\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043c\u043e\u0434\u0443\u043b\u044c. \u0412\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 DI-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0438 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044e\u0442\u0441\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 (Injectable services). \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0432\u0441\u0451 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u0432 Angular 2+ \u0437\u0430 \u0442\u0435\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c, \u0447\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code>components<\/code> \u0443 \u043d\u0430\u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>controllers<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u0434\u043b\u044f RESTful API, \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>providers<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u044b\/\u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432.\u00a0<\/p>\n<pre><code class=\"typescript\">import { Module } from '@nestjs\/common'; import { UserController } from '.\/user.controller'; import { UserService } from '.\/user.service';  @Module({   controllers: [UserController],   providers: [UserService],   exports: [UserService], }) export class UserModule {}<\/code><\/pre>\n<p>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b, \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 Spring. \u0421\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441, \u043f\u043e\u043c\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0443\u0436\u043d\u044b\u043c \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u043c (Controller, Handler, Injectable). \u041c\u0435\u0442\u043e\u0434\u044b \u043a\u043b\u0430\u0441\u0441\u0430 \u0442\u043e\u0436\u0435 \u043f\u043e\u043c\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438 (Get, Post, Put, Patch, Delete, Message \u0438 \u0442\u0434). \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440. \u0412 \u043e\u0431\u0449\u0435\u043c \u0432\u0441\u0451 \u043e\u0447\u0435\u043d\u044c \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e.<\/p>\n<pre><code class=\"typescript\">import { Injectable } from '@nestjs\/common'; import { User } from '.\/user.entity';  @Injectable() export class UserService {   private readonly users: User[] = [];    findAll(): User[] {     return this.users;   } }<\/code><\/pre>\n<pre><code class=\"typescript\">import { Controller, Get } from '@nestjs\/common'; import { User } from '.\/user.entity'; import { UserService } from '.\/user.service';  @Controller('users') export class UserController { constructor(   private readonly userService: UserService,   ) {}    @Get()   findAll(): User[] {     return userService.findAll();   } }<\/code><\/pre>\n<h2>\u0422\u0430\u043a \u043a\u0430\u043a\u0438\u0435 \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b?<\/h2>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0438 \u043d\u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043d\u0435 \u0432\u0438\u0434\u043d\u044b. \u041c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u043e\u0434\u0438\u043d \u043c\u043e\u0434\u0443\u043b\u044c, \u0432 \u043d\u0435\u0433\u043e \u0437\u0430\u043f\u0438\u0445\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0451 \u0438 \u0440\u0430\u0434\u0443\u0435\u043c\u0441\u044f \u0436\u0438\u0437\u043d\u0438. \u041d\u043e \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432, \u0437\u0430\u0447\u0435\u043c \u0438\u0445 \u043f\u0438\u0445\u0430\u0442\u044c \u0432 \u043e\u0434\u0438\u043d \u043c\u043e\u0434\u0443\u043b\u044c? \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e \u0434\u043e\u043c\u0435\u043d\u0430\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0438. \u0418 \u0432\u043e\u0442 \u0442\u0443\u0442 NestJS \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0435\u0431\u044f \u0432\u043e \u0432\u0441\u0435\u0439 \u043a\u0440\u0430\u0441\u0435.<\/p>\n<p>\u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u0438 \u0438\u043c\u0435\u044e\u0442 \u0441\u0432\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f DI? \u0414\u0430, \u043c\u0430\u043b\u043e \u043d\u0430\u043c npm \u0434\u043b\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u0443\u0442 \u0446\u0435\u043b\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 NestJS. \u0412\u0441\u0435\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0433\u0434\u0435 \u0438 \u043a\u0430\u043a \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0441\u0435\u0440\u0432\u0438\u0441 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0432 \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f. \u0410 \u0435\u0449\u0451 \u043c\u043e\u0434\u0443\u043b\u0438 \u0431\u044b\u0432\u0430\u044e\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0438 \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0438\u0437 \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0432\u043e\u043b\u0448\u0435\u0431\u043d\u043e\u043c\u0443 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0443 Inject, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0435\u0437\u0434\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u043c\u043e\u0434\u0443\u043b\u0435, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0432\u043e \u0432\u0441\u0435\u0445 \u043c\u043e\u0434\u0443\u043b\u044f\u0445, \u043d\u043e \u044d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043a\u043e\u0441\u0442\u044b\u043b\u044c, \u0447\u0435\u043c \u043d\u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041b\u0430\u0434\u043d\u043e, \u0430 \u0435\u0441\u043b\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438 \u043d\u0435 \u043f\u043e \u0434\u043e\u043c\u0435\u043d\u0430\u043c, \u0430 \u043f\u043e \u0441\u043b\u043e\u044f\u043c: domain, infrastructure, application, api, workers \u0438 \u0442.\u0434.? \u041c\u044b \u0441\u043d\u043e\u0432\u0430 \u043d\u0430\u0442\u044b\u043a\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u043d\u0436\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u044f infrastructure \u0432 \u043c\u043e\u0434\u0443\u043b\u044c application, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u044f\u0432\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c infrastructure \u043c\u043e\u0434\u0443\u043b\u044c \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 application, \u0438 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043c\u044b \u043b\u0438\u0448\u0430\u0435\u043c\u0441\u044f &#171;\u0447\u0438\u0441\u0442\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b&#187;. <\/p>\n<pre><code class=\"typescript\">import { Module } from '@nestjs\/common'; import { UserRepository } from '.\/repositories\/user.repository';  @Module({   providers: [UserRepository],   exports: [UserRepository], }) export class InfrastructureModule {}<\/code><\/pre>\n<pre><code class=\"typescript\">import { Module } from '@nestjs\/common'; import { InfrastructureModule } from '..\/infrastructure\/infrastructure.module'; import { UserService } from '.\/services\/user.service';  @Module({   imports: [InfrastructureModule],   providers: [UserService],   exports: [UserService], }) export class ApplicationModule {}<\/code><\/pre>\n<h2>\u0418\u0442\u043e\u0433\u0438<\/h2>\n<p>NestJS \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u043e\u0449\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f Enterprise-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041c\u043e\u0434\u0443\u043b\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430, \u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043b\u0438 \u043e\u043d\u043e \u0442\u043e\u0433\u043e, \u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u0430\u0434 \u0438\u0437-\u0437\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0440\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439? \u0412\u043e\u043f\u0440\u043e\u0441 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c, \u043d\u043e \u043b\u0438\u0447\u043d\u043e \u044f \u0437\u0430 \u044d\u0442\u043e \u043d\u0435\u043d\u0430\u0432\u0438\u0436\u0443 NestJS. \u0412\u0435\u0434\u044c \u0442\u043e\u0442 \u0436\u0435 Spring \u0438 ASP.NET Core \u0436\u0438\u0432\u0443\u0442 \u0438 \u0431\u0435\u0437 \u044d\u0442\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u043d\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0432\u0441\u0451 \u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u201c\u0447\u0438\u0441\u0442\u043e\u0439\u201d \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.\u00a0<\/p>\n<p>P.S. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0442\u0435 \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 \u043c\u043e\u0449\u043d\u044b\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c. \u0411\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <\/p>\n<div class=\"tm-article-poll\">\n<div class=\"tm-notice tm-article-poll__notice tm-notice_positive\"><!----> <\/p>\n<div class=\"tm-notice__inner\"><!----> <\/p>\n<div data-test-id=\"notice-content\" class=\"tm-notice__content\"><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/post\/679992\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__header\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043b\u0438 \u0432\u044b Nest.js \u0432 production?<\/div>\n<div class=\"tm-article-poll__answers\">\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">             55.56%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0414\u0430<\/span> <span class=\"tm-article-poll__answer-votes\">             15           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width:55.56%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             44.44%           <\/span> <span class=\"tm-article-poll__answer-label\">\u041d\u0435\u0442<\/span> <span class=\"tm-article-poll__answer-votes\">             12           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:44.44%;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__stats\">        \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 27 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.          \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 6 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.      <\/div>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/679992\/\"> https:\/\/habr.com\/ru\/post\/679992\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-336373","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/336373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=336373"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/336373\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=336373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=336373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=336373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}