Heroledger Postgres Example
This example demonstrates how to use the Heroledger User model against Postgres using the heromodels::db::postgres backend.
- Connects to Postgres with user
postgresand passwordtest123onlocalhost:5432. - Creates the table and indexes automatically on first use.
- Shows basic CRUD and an index lookup on
username.
Run it:
cargo run -p heromodels --example heroledger_example
Make sure Postgres is running locally and accessible with the credentials above.