001c2097a3
Created by Github action <!-- mintlify-editor-comments:start --> Mintlify --- 0 threads from 0 users in Mintlify - No unresolved comments <!-- mintlify-editor-comments:end --> <!-- mintlify-comment--> <a href="https://dashboard.mintlify.com/twenty/twenty/editor/i18n-docs?source=pr_comment" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://d3gk2c5xim1je2.cloudfront.net/assets/open-mintlify-editor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://d3gk2c5xim1je2.cloudfront.net/assets/open-mintlify-editor-light.svg"><img src="https://d3gk2c5xim1je2.cloudfront.net/assets/open-mintlify-editor-light.svg" alt="Open in Mintlify Editor"></picture></a> <!-- /mintlify-comment --> Co-authored-by: github-actions <github-actions@twenty.com>
104 lines
2.6 KiB
Plaintext
104 lines
2.6 KiB
Plaintext
---
|
||
title: Backend Komutları
|
||
---
|
||
|
||
## Faydalı Komutlar
|
||
|
||
Bu komutlar packages/twenty-server klasöründen çalıştırılmalıdır.
|
||
Diğer herhangi bir klasörden `npx nx {command} twenty-server` (veya `npx nx run twenty-server:{command}`) çalıştırabilirsiniz.
|
||
|
||
### İlk Kurulum
|
||
|
||
```
|
||
npx nx database:reset twenty-server # veritabanını geliştirme tohum verileriyle kur
|
||
```
|
||
|
||
### Sunucuyu Başlatma
|
||
|
||
```
|
||
npx nx run twenty-server:start
|
||
```
|
||
|
||
### Kod Temizleme
|
||
|
||
```
|
||
npx nx run twenty-server:lint # lint hatalarını düzeltmek için --fix'i geç
|
||
```
|
||
|
||
### Test
|
||
|
||
```
|
||
npx nx run twenty-server:test:unit # birim testleri çalıştır
|
||
npx nx run twenty-server:test:integration # entegrasyon testlerini çalıştır
|
||
```
|
||
|
||
Not: Entegrasyon testlerini çalıştırmadan önce veritabanını sıfırlamanız gerekirse `npx nx run twenty-server:test:integration:with-db-reset` komutunu kullanabilirsiniz.
|
||
|
||
### Veritabanını Sıfırlama
|
||
|
||
Veritabanını sıfırlamak ve tohum yüklemek istiyorsanız, aşağıdaki komutu kullanabilirsiniz:
|
||
|
||
```bash
|
||
npx nx run twenty-server:database:reset
|
||
```
|
||
|
||
### Geçişler
|
||
|
||
#### Core/Metadata şemalarında (TypeORM) nesneler için
|
||
|
||
```bash
|
||
npx nx run twenty-server:typeorm migration:generate src/database/typeorm/core/migrations/nameOfYourMigration -d src/database/typeorm/core/core.datasource.ts
|
||
```
|
||
|
||
#### Çalışma Alanı Nesneleri İçin
|
||
|
||
Çalışma alanı için geçiş dosyaları yoktur; her çalışma alanı için otomatik olarak oluşturulur,
|
||
veritabanında depolanır ve bu komut ile uygulanır.
|
||
|
||
```bash
|
||
npx nx run twenty-server:command workspace:sync-metadata -f
|
||
```
|
||
|
||
<Warning>
|
||
|
||
Bu işlem veritabanını siler, migrasyonları ve tohumlamayı yeniden çalıştırır.
|
||
|
||
Bu komutu çalıştırmadan önce saklamak istediğiniz verileri yedeklediğinizden emin olun.
|
||
|
||
</Warning>
|
||
|
||
## Teknoloji Yığını
|
||
|
||
Twenty, arka uç için öncelikle NestJS kullanır.
|
||
|
||
Prisma, kullandığımız ilk ORM idi. Ancak, kullanıcıların özel alanlar ve özel nesneler oluşturmasına izin vermek için, ince ayar kontrolü gerektirdiği için alt düzey bir seviye daha mantıklı geldi. Proje şu anda TypeORM kullanmaktadır.
|
||
|
||
İşte teknoloji yığını artık böyle görünüyor.
|
||
|
||
**Çekirdek**
|
||
|
||
* [NestJS](https://nestjs.com/)
|
||
* [TypeORM](https://typeorm.io/)
|
||
* [GraphQL Yoga](https://the-guild.dev/graphql/yoga-server)
|
||
|
||
**Veritabanı**
|
||
|
||
* [Postgres](https://www.postgresql.org/)
|
||
|
||
**Üçüncü Şahıs Entegrasyonları**
|
||
|
||
* [Sentry](https://sentry.io/welcome/) hataları izlemek için
|
||
|
||
**Test**
|
||
|
||
* [Jest](https://jestjs.io/)
|
||
|
||
**Araçlar**
|
||
|
||
* [Yarn](https://yarnpkg.com/)
|
||
* [ESLint](https://eslint.org/)
|
||
|
||
**Geliştirme**
|
||
|
||
* [AWS EKS](https://aws.amazon.com/eks/)
|