init commit

This commit is contained in:
2024-10-30 02:02:12 +01:00
commit ea4942bda1
93 changed files with 9909 additions and 0 deletions

21
examples/playground.rs Normal file
View File

@@ -0,0 +1,21 @@
#[allow(unused_imports)]
use loco_rs::{cli::playground, prelude::*};
use gabrielkaszewski_rs::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(())
}