Fix docs with missing npx (#8288)

Related to #8082

Created this PR on purpose after both #8083 and #8161 were closed and
respective branches were deleted by the author
This commit is contained in:
BOHEUS
2024-11-03 15:49:36 +00:00
committed by GitHub
parent 0c6c22b852
commit d350662984
3 changed files with 39 additions and 17 deletions

View File

@ -7,30 +7,30 @@ image: /images/user-guide/kanban-views/kanban.png
## Useful commands
These commands should be executed from packages/twenty-server folder.
From any other folder you can run `npx nx <command>` 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 # setup the database with dev seeds
npx nx database:reset twenty-server # setup the database with dev seeds
```
### Starting the app
### Starting the server
```
npx nx start
npx nx run twenty-server:start
```
### Lint
```
npx nx lint
npx nx run twenty-server:lint # pass --fix to fix lint errors
```
### Test
```
npx nx test:unit
npx nx run twenty-server:test:unit
```
### Resetting the database
@ -38,7 +38,24 @@ npx nx test:unit
If you want to reset the database, you can run the following command:
```bash
npx nx database:reset
npx nx run twenty-server:database:reset
```
### Migrations
#### For objects in Core/Metadata schemas (TypeORM)
```bash
npx nx run twenty-server:typeorm --migration:generate src/database/typeorm/metadata/migrations/nameOfYourMigration -d src/database/typeorm/metadata/metadata.datasource.ts # replace by core data source if necessary
```
#### For Workspace objects
There are no migrations files, migration are generated automatically for each workspace,
stored in the database, and applied with this command
```bash
npx nx run twenty-server:command workspace:sync-metadata -f
```
<ArticleWarning>