Compare commits
No commits in common. "ec2598a2cca95ab62695e6bcd739fde7ec1dd6be" and "522a95333140fdff5945ad05f89752d041091e6b" have entirely different histories.
ec2598a2cc
...
522a953331
4 changed files with 646 additions and 439 deletions
1069
Cargo.lock
generated
1069
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -25,7 +25,7 @@ thiserror = "1"
|
|||
tokio = { version = "1", features = ["full"] }
|
||||
tower = { version = "0.4", features = ["full"] }
|
||||
tower-http = { version = "0.5", features = ["fs"] }
|
||||
wasm-bindgen = "0.2.92"
|
||||
wasm-bindgen = "0.2.89"
|
||||
|
||||
# See https://github.com/akesson/cargo-leptos for documentation of all the parameters.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use app::components::api::Article;
|
||||
use leptos::*;
|
||||
use serde::*;
|
||||
use sqlx::{sqlite::SqlitePoolOptions, *};
|
||||
use sqlx::*;
|
||||
|
||||
pub async fn db_build(pool: &SqlitePool) -> Result<(), ServerFnError> {
|
||||
let _res = query(
|
||||
|
@ -18,7 +18,7 @@ pub async fn db_build(pool: &SqlitePool) -> Result<(), ServerFnError> {
|
|||
.execute(pool)
|
||||
.await?;
|
||||
|
||||
println!("{:?}", _res);
|
||||
// println!("{:?}", _res);
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct ArticleFrontmatter {
|
||||
|
@ -66,7 +66,7 @@ pub async fn db_build(pool: &SqlitePool) -> Result<(), ServerFnError> {
|
|||
.execute(pool)
|
||||
.await?;
|
||||
|
||||
println!("{:?}", _res);
|
||||
// println!("{:?}", _res);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -96,11 +96,9 @@ pub async fn start_pool() -> Result<SqlitePool, ServerFnError> {
|
|||
db goin up"
|
||||
);
|
||||
|
||||
let pool = SqlitePoolOptions::new()
|
||||
.connect("file::memory:?cache=shared")
|
||||
.await?;
|
||||
let pool = SqlitePool::connect("sqlite://doordesk.db").await?;
|
||||
|
||||
let _ = db_build(&pool).await?;
|
||||
let _ = db_build(&pool);
|
||||
|
||||
Ok(pool)
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ async fn main() {
|
|||
let addr = leptos_options.site_addr;
|
||||
let routes = generate_route_list(App);
|
||||
|
||||
let pool: sqlx::SqlitePool = start_pool().await.expect("pool error");
|
||||
let pool = start_pool().await.expect("pool error");
|
||||
|
||||
let app = Router::new()
|
||||
.leptos_routes_with_context(
|
||||
|
|
Loading…
Add table
Reference in a new issue