The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
---
title: Comandi Backend
---
import { PageBanner } from "/snippets/page-banner.mdx"
## Comandi utili
Questi comandi devono essere eseguiti dalla cartella packages/twenty-server.
Da qualsiasi altra cartella puoi eseguire `npx nx {command} twenty-server` (oppure `npx nx run twenty-server:{command}`).
### Impostazione iniziale
```
npx nx database:reset twenty-server # setup the database with dev seeds
```
### Avvio del server
```
npx nx run twenty-server:start
```
### Lint
```
npx nx run twenty-server:lint # pass --fix to fix lint errors
```
### Test
```
npx nx run twenty-server:test:unit # run unit tests
npx nx run twenty-server:test:integration # run integration tests
```
Nota: puoi eseguire `npx nx run twenty-server:test:integration:with-db-reset` nel caso in cui sia necessario resettare il database prima di eseguire i test di integrazione.
### Ripristino del database
Se vuoi resettare e seminare il database, puoi eseguire il seguente comando:
```bash
npx nx run twenty-server:database:reset
```
### Migrazioni
#### Per oggetti negli schemi Core/Metadata (TypeORM)
```bash
npx nx run twenty-server:database:migrate:generate
```
## Tech Stack
Twenty utilizza principalmente NestJS per il backend.
Prisma è stato il primo ORM che abbiamo usato. Ma per permettere agli utenti di creare campi personalizzati e oggetti personalizzati, un livello più basso aveva più senso poiché abbiamo bisogno di avere un controllo granulare. Il progetto ora utilizza TypeORM.
Ecco come appare ora lo stack tecnologico.
**Core**
* [NestJS](https://nestjs.com/)
* [TypeORM](https://typeorm.io/)
* [GraphQL Yoga](https://the-guild.dev/graphql/yoga-server)
**Database**
* [Postgres](https://www.postgresql.org/)
**Integrazioni di terze parti**
* [Sentry](https://sentry.io/welcome/) per il tracciamento degli errori
**Testing**
* [Jest](https://jestjs.io/)
**Strumenti**
* [Yarn](https://yarnpkg.com/)
* [Oxlint](https://oxc.rs/docs/guide/usage/linter.html)
**Sviluppo**
* [AWS EKS](https://aws.amazon.com/eks/)
<PageBanner illustration="card-page-cli" />