Skip to content

Commit

Permalink
align example
Browse files Browse the repository at this point in the history
  • Loading branch information
jondot committed Sep 2, 2024
1 parent 94c3f3b commit 1a744c3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/demo/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[alias]
loco = "run --"
loco-tool = "run --bin tool --"
playground = "run --example playground"
6 changes: 6 additions & 0 deletions examples/demo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
name = "blo"
version = "0.1.0"
edition = "2021"
default-run = "blo-cli"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down Expand Up @@ -47,6 +48,11 @@ name = "blo-cli"
path = "src/bin/main.rs"
required-features = []

[[bin]]
name = "tool"
path = "src/bin/tool.rs"
required-features = []

[dev-dependencies]
serial_test = "3.1.1"
rstest = "0.21.0"
Expand Down
8 changes: 8 additions & 0 deletions examples/demo/src/bin/tool.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use blo::app::App;
use loco_rs::cli;
use migration::Migrator;

#[tokio::main]
async fn main() -> loco_rs::Result<()> {
cli::main::<App, Migrator>().await
}

0 comments on commit 1a744c3

Please sign in to comment.