A mobile app for listening to radio stations from around the globe
git clone git://soophie.de/verbal
16
tokio = { version = "1.19.2", features = ["full"] }17
async-std = { version = "1.12.0", features = ["attributes", "tokio1"] }18
sqlx = { version = "0.5.13", features = ["runtime-tokio-rustls", "postgres"] }20
[[bin]]21
name = "main"22
path = "src/main.rs"24
[[bin]]25
name = "test"26
path = "src/test.rs"
1
mod model;3
use sqlx::postgres::PgPool;5
#[tokio::main]6
async fn main() {7
let database_url = "postgres://typable:De24Si98@192.168.2.3:9748/verbal?sslmode=disable";8
let pool = PgPool::connect(database_url).await.unwrap();9
let accounts = sqlx::query_as::<_, model::Account>("SELECT * FROM account")10
.fetch_all(&pool)11
.await12
.unwrap();13
println!("{:#?}", accounts);14
}