/ examples / playground.rs
playground.rs
 1  use microvisor::app::App;
 2  #[allow(unused_imports)]
 3  use loco_rs::{cli::playground, prelude::*};
 4  
 5  #[tokio::main]
 6  async fn main() -> loco_rs::Result<()> {
 7      let _ctx = playground::<App>().await?;
 8  
 9      // let active_model: articles::ActiveModel = articles::ActiveModel {
10      //     title: Set(Some("how to build apps in 3 steps".to_string())),
11      //     content: Set(Some("use Loco: https://loco.rs".to_string())),
12      //     ..Default::default()
13      // };
14      // active_model.insert(&ctx.db).await.unwrap();
15  
16      // let res = articles::Entity::find().all(&ctx.db).await.unwrap();
17      // println!("{:?}", res);
18      println!("welcome to playground. edit me at `examples/playground.rs`");
19  
20      Ok(())
21  }