diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 6ea0b5e40..55202cf3e 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -14,25 +14,23 @@ 1. Run `npm install` 1. Run `docker compose -f docker/docker-compose.dev.yml up -d` to start [PostgreSQL](https://www.postgresql.org) and [Redis](https://redis.io) 1. Run `npm run database:setup` to initialize the database schema -1. Start the [server](#start-server) and the [client](#start-client) +1. Start the [development environment](#start-development-environment) (recommended) or start [server](#start-server) and [client](#start-client) separately 1. Open https://localhost:4200/en in your browser 1. Create a new user via _Get Started_ (this first user will get the role `ADMIN`) -### Start Server +### Start Development Environment -#### Debug - -Run `npm run watch:server` and click _Debug API_ in [Visual Studio Code](https://code.visualstudio.com) +#### Parallel Development (Recommended) -#### Serve +Run `npm run dev` to start both server and client simultaneously with hot reload: -Run `npm run start:server` +#### English (Default) -### Start Client +- Client: https://localhost:4200/en -#### English (Default) +#### Debug -Run `npm run start:client` and open https://localhost:4200/en in your browser. +Run `npm run watch:server` and click _Debug API_ in [Visual Studio Code](https://code.visualstudio.com) #### Other Languages diff --git a/package.json b/package.json index 3fe2fa72f..280a9f7e9 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "start:client": "nx run client:copy-assets && nx run client:serve --configuration=development-en --hmr -o", "start:production": "npm run database:migrate && npm run database:seed && node main", "start:server": "nx run api:copy-assets && nx run api:serve --watch", + "dev": "nx run api:copy-assets && nx run client:copy-assets && nx run-many --targets=serve --parallel --projects=api,client --configuration=development-en && nx run client:serve --configuration=development-en --hmr -o", "start:storybook": "nx run ui:storybook", "test": "npx dotenv-cli -e .env.example -- npx nx run-many --target=test --all --parallel=4", "test:api": "npx dotenv-cli -e .env.example -- nx test api",