sqlx/examples/postgres/chat
Yuri Astrakhan a824e8468c
Cleanup format arguments (#2650)
Inlined format args make code more readable, and code more compact.

I ran this clippy command to fix most cases, and then cleaned up a few trailing commas and uncaught edge cases.

```
cargo clippy --bins --examples  --benches --tests --lib --workspace --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2023-07-31 13:27:04 -07:00
..
src Cleanup format arguments (#2650) 2023-07-31 13:27:04 -07:00
Cargo.toml Add postgres chat exmaple (#2577) 2023-07-24 16:09:06 -07:00
README.md Add postgres chat exmaple (#2577) 2023-07-24 16:09:06 -07:00

Chat Example

Note: this example has an interactive TUI which is not trivial to test automatically, so our CI currently only checks whether or not it compiles.

Description

This example demonstrates how to use PostgreSQL channels to create a very simple chat application.

Setup

  1. Declare the database URL

    export DATABASE_URL="postgres://postgres:password@localhost/files"
    

Usage

Run the project

cargo run -p sqlx-examples-postgres-chat