RustRover cargo-generate template: Axum + Vue 3 + TypeScript + Tailwind + sqlx
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

runbook.md 1.3 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Runbook
  2. ## First run
  3. ```bash
  4. cp .env.example .env
  5. docker compose -f infra/compose/docker-compose.yml up -d postgres
  6. cargo run -p server
  7. ```
  8. In another terminal:
  9. ```bash
  10. cd apps/web && npm install && npm run dev
  11. ```
  12. Open http://127.0.0.1:5173. Swagger UI is at http://127.0.0.1:8080/api/docs.
  13. ## RustRover
  14. 1. Open this folder as a Cargo workspace.
  15. 2. Run configuration: `cargo run -p server`.
  16. 3. Environment: `APP_ENV=development`.
  17. 4. Optional custom template: Settings → New Project → add this Git URL as a cargo-generate template.
  18. ## Config overrides
  19. | Knob | Where |
  20. | --- | --- |
  21. | Profile | `APP_ENV=development\|production` |
  22. | File | `config/{APP_ENV}.toml` |
  23. | Env | `APP__SERVER__PORT=8080` |
  24. | Explicit dir | `APP_CONFIG_DIR=/abs/path/to/config` |
  25. ## Generate the frontend client
  26. ```bash
  27. just generate-api
  28. ```
  29. Vite also regenerates on dev/build if `packages/contracts/openapi.json` changes.
  30. ## Postgres URL
  31. Default: `postgres://app:app@127.0.0.1:5432/app`
  32. That user only exists if you start the bundled compose file. For a local cluster, override with `APP__DATABASE__URL` (two underscores after `APP`) or `config/local.toml`:
  33. ```toml
  34. [database]
  35. url = "postgres://YOUR_USER:YOUR_PASS@127.0.0.1:5432/YOUR_DB"
  36. ```
  37. `DATABASE_URL` is for sqlx-cli only. The server does not read it.