The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
---
title: Comandos de Backend
---
## Comandos Úteis
Esses comandos devem ser executados a partir da pasta packages/twenty-server.
Em qualquer outra pasta você pode executar o `npx nx {command} twenty-server` (ou o `npx nx run twenty-server:{command}`).
### Configuração inicial
```
npx nx database:reset twenty-server # setup the database with dev seeds
```
### Iniciando o servidor
```
npx nx run twenty-server:start
```
### Lint
```
npx nx run twenty-server:lint # pass --fix to fix lint errors
```
### Teste
```
npx nx run twenty-server:test:unit # run unit tests
npx nx run twenty-server:test:integration # run integration tests
```
Nota: você pode executar `npx nx run twenty-server:test:integration:with-db-reset` caso precise redefinir o banco de dados antes de executar os testes de integração.
### Redefinindo o banco de dados
Se você deseja redefinir e semear a base de dados, pode executar o seguinte comando:
```bash
npx nx run twenty-server:database:reset
```
### Migrações
#### Para objetos nos esquemas Core/Metadata (TypeORM)
```bash
npx nx run twenty-server:database:migrate:generate
```
## Pilha de Tecnologias
O Twenty usa principalmente NestJS para o backend.
Prisma foi o primeiro ORM que usamos. Mas para permitir que os usuários criem campos e objetos personalizados, um nível mais baixo fazia mais sentido, pois precisamos ter controle detalhado. O projeto agora usa TypeORM.
Veja como a pilha de tecnologia se parece agora.
**Core**
* [NestJS](https://nestjs.com/)
* [TypeORM](https://typeorm.io/)
* [GraphQL Yoga](https://the-guild.dev/graphql/yoga-server)
**Banco de Dados**
* [Postgres](https://www.postgresql.org/)
**Integrações de terceiros**
* [Sentry](https://sentry.io/welcome/) para rastreamento de bugs
**Testes**
* [Jest](https://jestjs.io/)
**Ferramentas**
* [Yarn](https://yarnpkg.com/)
* [Oxlint](https://oxc.rs/docs/guide/usage/linter.html)
**Desenvolvimento**
* [AWS EKS](https://aws.amazon.com/eks/)