Files
twenty/packages/twenty-docs/l/sr/developers/backend-development/server-commands.mdx
T
8cadd00d34 i18n - translations (#15799)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-11-13 16:34:00 +01:00

110 lines
3.0 KiB
Plaintext

---
title: Backend наредбе
image: /слике/кориснички-водич/канбан-прегледи/канбан.png
---
<Frame>
<img src="/images/user-guide/kanban-views/kanban.png" alt="Header" />
</Frame>
## Корисне команде
Ове наредбе треба извршити из фасцикле packages/twenty-server.
From any other folder you can run `npx nx {command} twenty-server` (or `npx nx run twenty-server:{command}`).
### First time setup
```
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 # pass --fix to fix lint errors
```
### Тест
```
npx nx run twenty-server:test:unit # run unit tests
npx nx run twenty-server:test:integration # run integration tests
```
Note: you can run `npx nx run twenty-server:test:integration:with-db-reset` in case you need to reset the database before running the integration tests.
### Ресетовање базе података
If you want to reset and seed the database, you can run the following command:
```bash
npx nx run twenty-server:database:reset
```
### Миграције
#### За објекте у шемама Core/Metadata (TypeORM)
```bash
npx nx run twenty-server:typeorm migration:generate src/database/typeorm/core/migrations/nameOfYourMigration -d src/database/typeorm/core/core.datasource.ts
```
#### За Workspace објекте
Нема миграционих датотека, миграције се аутоматски генеришу за сваки workspace,
чувају се у бази података и примењују се овом командом
```bash
npx nx run twenty-server:command workspace:sync-metadata -f
```
<Warning>
This will drop the database and re-run the migrations and seed.
Make sure to back up any data you want to keep before running this command.
</Warning>
## Технолошки Скуп
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/)
- [ESLint](https://eslint.org/)
**Развој**
- [AWS EKS](https://aws.amazon.com/eks/)