Skip to content

Commit

Permalink
docs: add note about tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cecelot committed Jun 15, 2024
1 parent 4fee4b0 commit be9e531
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ This repository consists of a Rust web server using [axum](https://docs.rs/axum/

It is recommended to use the Nix development shell at the root of this repository to automatically install all necessary dependencies (excluding Docker, which must be installed manually).

### Environment Variables

- `DATABASE_URL` (default: `postgres://olly:password@0.0.0.0:5432/olly`) - specifies the address of the PostgreSQL database

### Steps

1. Start the PostgreSQL database: `docker compose up`
2. Migrate the database: `cargo run --package migration up`
3. Start the `axum` server: `cargo run`
4. Run the web client: `cd client && npm run dev`

### Testing

**Frontend:** Nothing automated yet.

**Backend:** Use Cargo's built in runner (`cargo test`). After each subsequent execution, `sea-orm-cli migrate fresh` must be run to ensure that app state is refreshed to defaults. Otherwise, some tests may fail.

## Environment Variables

- `DATABASE_URL` (default: `postgres://olly:password@0.0.0.0:5432/olly`) - specifies the address of the PostgreSQL database

0 comments on commit be9e531

Please sign in to comment.