[번역] Nest 공식문서 - 1. 소개

SuJeong·2022년 6월 19일
1
post-thumbnail

공식 문서 바로가기

Introduction 소개

Introduction 소개

Nest (NestJS) is a framework / for building / efficient, scalable Node.js server-side applications.

Nest는 효율적이고 확장 가능한 Node.js *서버 사이드 애플리케이션을 구축하기 위한 프레임워크이다.

*서버 사이드 : 서버 측에서 즉시 처리하는 것으로, 서버 사이드 언어를 다루는 것을 백엔드라고 함

It uses progressive JavaScript, / is built with / and fully supports TypeScript / (yet still enables developers to code / in pure JavaScript) / and combines elements of OOP / (Object Oriented Programming), / FP (Functional Programming), / and FRP (Functional Reactive Programming).

Typescript(그러나 여전히 개발자들이 순수 JavaScript로 코딩을 할 수 있음)로 구축되고 완벽하게 지원하는, OOP(객체 지향 프로그래밍), FP(함수형 프로그래밍), *FRP(기능 반응 프로그래밍) 요소를 결합하는 '진보한 JavaScript'를 사용한다.

*FRP : 비동기적인 데이터 처리를 간단한 함수를 통해 수행한다.

Under the hood, / Nest makes use of robust HTTP Server frameworks / like Express (the default) / and optionally / can be configured to use Fastify / as well!

내부를 보면, Nest는 Express(기본)와 같은 강력한 HTTP 서버 프레임워크를 사용하고 또한 선택적으로 Fastify도 사용해서 구성할 수 있다.

Nest provides a level of abstraction / above these common Node.js frameworks (Express/Fastify)/, but also exposes their APIs directly / to the developer.

Nest는 Express나 Fastify 같은 일반적인 Node.js 프레임워크보다 높은 추상화 레벨을 제공하지만 또한 API를 개발자에게 직접적으로 노출한다.

This gives developers the freedom / to use the myriad of third-party modules / which are available / for the underlying platform.

이것은 개발자에게 기본 플랫폼에서 이용하는 무수한 타사의 모듈을 사용할 수 있는 자유를 준다.

Philosophy 철학

In recent years, / thanks to Node.js, / JavaScript has become the “lingua franca” of the web / for both front and backend applications.

최근 몇 년 동안, Node.js 덕분에 JavaScript는 프론트엔드와 백엔드 어플리케이션을 아우르는 웹의"*lingua franca"가 되었다.

*서로 다른 모어를 사용하는 화자들이 의사소통하기위해 사용하는 공통어

This has given rise to awesome projects / like Angular, React and Vue, / which improve developer productivity / and enable the creation of fast, testable, and extensible / frontend applications.

프론트엔드 어플리케이션을 빠르고 테스트 가능하고 확장 가능한 결과물을 만들 수 있고 개발자의 생산성을 향상시키는 Angular, React, Vue와 같은 놀라운 프로젝트를 만들어냈다.

However, / while plenty of superb libraries, helpers, and tools / exist for Node (and server-side JavaScript), / none of them / effectively solve the main problem of - Architecture.

그러나 많은 훌륭한 라이브러리, 도우미, 툴이 노드(그리고 서버 사이드 JavaScript)에 존재하지만, 그 중 어떤 것도 효과적으로 아키텍처에 대한 주요 문제를 해결하지 못했다.

Nest provides an out-of-the-box application architecture / which allows developers and teams / to create highly testable, scalable, loosely coupled, and easily maintainable applications.

Nest는 개발자들과 팀이 높은 테스트 가능성, 확장 가능성, 낮은 의존성, 그리고 쉬운 유지보수가 가능한 어플리케이션을 만들 수 있는 즉시 사용가능한 어플리케이션 아키텍처를 제공한다.

The architecture is heavily inspired by Angular.

아키텍처는 Angular에서 크게 영감을 받았다.

Installation 설치

To get started, / you can either scaffold the project / with the Nest CLI, or clone a starter project (both will produce the same outcome).

시작하기 위해, Nest CLI와 프로젝트를 *스케폴딩하거나 초보자용 프로젝트를 복제하는 것이 필요하다. (둘다 같은 결과를 제공할 것)

*스케폴딩 : 초기 프로젝트의 뼈대를 만드는 작업

To scaffold the project with the Nest CLI, run the following commands.

Nest CLI의 스케폴딩을 하기 위해서는, 다음 명령어를 실행해야한다.

This will create a new project directory, / and populate the directory / with the initial core Nest files / and supporting modules, creating a conventional base structure / for your project.

새로운 프로젝트가 생성되고 초기 핵심 Nest 파일과 지원하는 모듈들과 함께 폴더가 생성되어 프로젝트의 규정된 기본 구조가 만들어진다.

Creating a new project with the Nest CLI / is recommended / for first-time users.

첫 사용자에게는 Nest CLI를 통해 새로운 프로젝트를 생성하는것을 추천한다.

We'll continue / with this approach in First Steps.

우리는 첫 단계에서 이 접근을 계속할 것이다.

$ npm i -g @nestjs/cli
$ nest new project-name

Alternatives 대안

Alternatively, to install the TypeScript starter project with Git:

또 다른 대안으로, git으로 TypeScript 초보자용 프로젝트를 설치하는 것이다.

$ git clone https://github.com/nestjs/typescript-starter.git project
$ cd project
$ npm install
$ npm run start

Hint : If you'd like to clone the repository / without the git history, / you can use degit.

만약 git 히스토리 없이 레포지토리를 복제하고 싶다면, degit을 사용하면 된다.

Open your browser and navigate to http://localhost:3000/

브라우저를 열고 http://localhost:3000/ 로 이동한다.

To install the JavaScript flavor of the starter project, / use javascript-starter.git / in the command sequence above.

JavaScript 버전의 초보자용 프로젝트를 설치하고 싶다면, 위의 명령 시퀀스에 javascript-starter.git을 사용하면 된다.

You can also manually create a new project / from scratch / by installing the core / and supporting files with npm (or yarn).

또한 핵심적인 파일과 npm(또는 yarn)으로 지원하는 파일들을 설치하여 *처음부터 수동으로 새로운 프로젝트를 생성할 수도 있다.

*from scratch : from the beginning, without using anything that already exists(이미 존재하는, 사용되던 것을 사용하지 않고 처음부터)

In this case, of course, you'll be responsible for creating the project / boilerplate files yourself.

물론 이 경우에는 스스로 *프로젝트 상용구 파일을 책임지고 생성해야한다.

*boilerplate : 개발을 시작할 수 있는 기초가 되는 주춧돌

$ npm i --save @nestjs/core @nestjs/common rxjs reflect-metadata

reference

https://chlolisher.tistory.com/131

https://jw910911.tistory.com/22

profile
backend developer / 꾸준히 배우고 적용하는걸 좋아합니다!

0개의 댓글