Files
thoth/examples/playground.rs
Dylan Knutson c8cc36f3d6
Some checks failed
CI / Run Clippy (push) Failing after 4s
CI / Check Style (push) Successful in 14s
CI / Run Tests (push) Failing after 19s
Initialize loco app
2024-11-30 13:29:56 -08:00

22 lines
685 B
Rust

#[allow(unused_imports)]
use loco_rs::{cli::playground, prelude::*};
use thoth::app::App;
#[tokio::main]
async fn main() -> loco_rs::Result<()> {
let _ctx = playground::<App>().await?;
// let active_model: articles::ActiveModel = ActiveModel {
// title: Set(Some("how to build apps in 3 steps".to_string())),
// content: Set(Some("use Loco: https://loco.rs".to_string())),
// ..Default::default()
// };
// active_model.insert(&ctx.db).await.unwrap();
// let res = articles::Entity::find().all(&ctx.db).await.unwrap();
// println!("{:?}", res);
println!("welcome to playground. edit me at `examples/playground.rs`");
Ok(())
}