You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
614 B
24 lines
614 B
use clap::Parser; |
|
use sqlx::sqlite::SqliteConnectOptions; |
|
use sqlx::sqlite::SqlitePoolOptions; |
|
|
|
use crate::domain::options::Options; |
|
|
|
mod domain; |
|
|
|
#[tokio::main] |
|
async fn main() -> Result<(), sqlx::Error> { |
|
dotenv::dotenv().ok(); |
|
let options = Options::parse(); |
|
|
|
let pool = SqlitePoolOptions::new() |
|
.connect_with( |
|
SqliteConnectOptions::new() |
|
.filename(options.working_directory.join("memoirs.sqlite")) |
|
.create_if_missing(true), |
|
) |
|
.await?; |
|
sqlx::migrate!("./migrations").run(&pool).await?; |
|
print!("Hello world!"); |
|
Ok(()) |
|
}
|
|
|