use std::str::FromStr; use rot::rest; use sqlx::{pool::PoolOptions, sqlite::SqliteConnectOptions, ConnectOptions}; #[macro_use] extern crate rocket; #[launch] async fn rocket() -> _ { env_logger::init(); //let pool = SqlitePool::connect(":memory:").await.unwrap(); let mut connection_options = SqliteConnectOptions::from_str("sqlite://db.sqlite").unwrap(); connection_options.log_statements(log::LevelFilter::Debug); let pool = PoolOptions::new() .connect_with(connection_options) .await .unwrap(); rest::start(pool) }