--- title: פקודות בקאנד image: /images/user-guide/kanban-views/kanban.png --- Header ## פקודות שימושיות These commands should be executed from packages/twenty-server folder. 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 ``` הערה: ניתן להריץ `npx nx run twenty-server:test:integration:with-db-reset` במקרה ויש צורך לאפס את בסיס הנתונים לפני בדיקות האינטגרציה. ### איפוס בסיס הנתונים אם ברצונך לאפס ולהזין את בסיס הנתונים, ניתן להריץ את הפקודה הבאה: ```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 ``` #### עבור אובייקטים במרחב העבודה אין קבצי העברה, ההעברות נוצרות באופן אוטומטי עבור כל מרחב עבודה, מאוחסנות בבסיס הנתונים ונעשות באמצעות הפקודה זו ```bash npx nx run twenty-server:command workspace:sync-metadata -f ``` פעולה זו תמחק את בסיס הנתונים ותבצע מחדש את ההעברות והזנות. ודא לגבות כל מידע שברצונך לשמור לפני הפעלת פקודה זו. ## Tech Stack 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/)