Skip to content

Commit

Permalink
Update the persistence service
Browse files Browse the repository at this point in the history
  • Loading branch information
vladbat00 committed Jan 5, 2023
1 parent dad8c4b commit 4a90296
Show file tree
Hide file tree
Showing 6 changed files with 258 additions and 245 deletions.
59 changes: 28 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ The workspace contains the following binary projects:
- `mr_dekstop_client`
- `mr_web_client`
- `mr_server`
- `mr_matchmaker`
- `mr_persistence`

### Running the desktop client and the server

Expand All @@ -62,6 +64,20 @@ wasm-pack build --target web
basic-http-server . # or any other tool that can serve static files
```

### Running the persistence service

#### Prerequisites:

- PostgreSQL database
- sqlx-cli
- Auth0 and Google OAuth 2.0 client credentials (see the environment variables section)

#### Creating a database

```
DATABASE_URL=postgres://postgres@localhost/mr_persistence_development sqlx database setup
```

### Environment variables

Environment variables are read when both compiling the binaries and running
Expand Down
2 changes: 1 addition & 1 deletion bins/persistence/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sentry = "0.26.0"
serde = "1.0"
serde_derive = "1.0.133"
serde_json = "1.0"
sqlx = { version = "0.5.10", features = ["runtime-actix-native-tls", "postgres", "chrono", "offline", "json"] }
sqlx = { version = "0.6.2", features = ["runtime-actix-native-tls", "postgres", "chrono", "offline", "json"] }
tokio = "1.19.2"

[build-dependencies]
Expand Down
Loading

0 comments on commit 4a90296

Please sign in to comment.