diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 00000000..0986a0f8 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,4 @@ +[alias] +db = ["run", "--package", "cli", "--bin", "db", "--"] +w = ["watch", "--exec", "run"] +t = ["nextest", "run"] diff --git a/Cargo.lock b/Cargo.lock index fc1b581a..c9ff36ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -825,6 +825,10 @@ dependencies = [ "inout", ] +[[package]] +name = "cli" +version = "0.1.0" + [[package]] name = "concurrent-queue" version = "2.5.0" diff --git a/Cargo.toml b/Cargo.toml index a03d809d..d7095976 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = [ "config", "macros", "web", ] +members = [ "cli", "config", "macros", "web", ] resolver = "2" default-members = ["web"] diff --git a/README.md b/README.md index fa8c7a28..c884e7ca 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ rc_reload=NO ``` -``` +```ini # Postgres # DATABASE_URL=postgres://postgres@localhost/my_database # SQLite @@ -46,3 +46,11 @@ SMTP_PORT="25" # SMTP_PASSWORD="" SMTP_TLSTYPE="none" ``` + +## drop test databases +```bash +for dbname in $(psql -c "copy (select datname from pg_database where datname like 'brass_test_%') to stdout") ; do + echo "$dbname" + #dropdb -i "$dbname" +done +``` diff --git a/cli/Cargo.toml b/cli/Cargo.toml new file mode 100644 index 00000000..b6cfa8c7 --- /dev/null +++ b/cli/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "cli" +version = "0.1.0" +edition = "2021" + +[lib] + +[[bin]] +name = "db" +path = "src/db.rs" + +[dependencies] diff --git a/cli/src/db.rs b/cli/src/db.rs new file mode 100644 index 00000000..239ebf26 --- /dev/null +++ b/cli/src/db.rs @@ -0,0 +1,3 @@ +fn main() { + println!("abc"); +} diff --git a/cli/src/lib.rs b/cli/src/lib.rs new file mode 100644 index 00000000..dec10232 --- /dev/null +++ b/cli/src/lib.rs @@ -0,0 +1 @@ +pub mod db;