80 lines
2.0 KiB
Plaintext
80 lines
2.0 KiB
Plaintext
---
|
|
title: 백엔드 명령어
|
|
---
|
|
|
|
## 유용한 명령어
|
|
|
|
이 명령어들은 packages/twenty-server 폴더에서 실행되어야 합니다.
|
|
다른 폴더에서 `npx nx {command} twenty-server` (또는 `npx nx run twenty-server:{command}`)를 실행할 수 있습니다.
|
|
|
|
### 최초 설정
|
|
|
|
```
|
|
npx nx database:reset twenty-server # setup the database with dev seeds
|
|
```
|
|
|
|
### 서버 시작
|
|
|
|
```
|
|
npx nx run twenty-server:start
|
|
```
|
|
|
|
### Lint
|
|
|
|
```
|
|
npx nx run twenty-server:lint # lint 오류를 수정하려면 --fix를 사용
|
|
```
|
|
|
|
### 테스트
|
|
|
|
```
|
|
npx nx run twenty-server:test:unit # run unit tests
|
|
npx nx run twenty-server:test:integration # run integration tests
|
|
```
|
|
|
|
참고: 데이터베이스를 재설정한 뒤 통합 테스트를 실행해야 하는 경우 `npx nx run twenty-server:test:integration:with-db-reset`을 실행할 수 있습니다.
|
|
|
|
### 데이터베이스 재설정
|
|
|
|
데이터베이스를 재설정하고 시드 하려면 다음 명령어를 실행하십시오:
|
|
|
|
```bash
|
|
npx nx run twenty-server:database:reset
|
|
```
|
|
|
|
### 마이그레이션
|
|
## 기술 스택
|
|
|
|
Twenty는 주로 NestJS를 백엔드에 사용합니다.
|
|
|
|
Prisma가 우리가 처음으로 사용한 ORM이었습니다. 그러나 사용자들이 사용자 지정 필드와 사용자 지정 객체를 만들 수 있도록 하려면 세밀하게 제어할 수 있어야 하므로 더 낮은 수준이 더 합리적이었습니다. 현재 프로젝트는 TypeORM을 사용합니다.
|
|
|
|
다음은 현재 기술 스택의 모습입니다.
|
|
|
|
**코어**
|
|
|
|
* [NestJS](https://nestjs.com/)
|
|
* [TypeORM](https://typeorm.io/)
|
|
* [GraphQL Yoga](https://the-guild.dev/graphql/yoga-server)
|
|
|
|
**데이터베이스**
|
|
|
|
* [Postgres](https://www.postgresql.org/)
|
|
|
|
**서드파티 연동**
|
|
|
|
* 버그 추적을 위한 [Sentry](https://sentry.io/welcome/)
|
|
|
|
**테스트**
|
|
|
|
* [Jest](https://jestjs.io/)
|
|
|
|
**도구**
|
|
|
|
* [Yarn](https://yarnpkg.com/)
|
|
* [Oxlint](https://oxc.rs/docs/guide/usage/linter.html)
|
|
|
|
**개발**
|
|
|
|
* [AWS EKS](https://aws.amazon.com/eks/)
|