feat: add cli package
This commit is contained in:
parent
0844cc5a17
commit
9a6c714d74
4
.cargo/config.toml
Normal file
4
.cargo/config.toml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[alias]
|
||||||
|
db = ["run", "--package", "cli", "--bin", "db", "--"]
|
||||||
|
w = ["watch", "--exec", "run"]
|
||||||
|
t = ["nextest", "run"]
|
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -825,6 +825,10 @@ dependencies = [
|
|||||||
"inout",
|
"inout",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cli"
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "concurrent-queue"
|
name = "concurrent-queue"
|
||||||
version = "2.5.0"
|
version = "2.5.0"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[workspace]
|
[workspace]
|
||||||
members = [ "config", "macros", "web", ]
|
members = [ "cli", "config", "macros", "web", ]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
default-members = ["web"]
|
default-members = ["web"]
|
||||||
|
|
||||||
|
10
README.md
10
README.md
@ -29,7 +29,7 @@ rc_reload=NO
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
```
|
```ini
|
||||||
# Postgres
|
# Postgres
|
||||||
# DATABASE_URL=postgres://postgres@localhost/my_database
|
# DATABASE_URL=postgres://postgres@localhost/my_database
|
||||||
# SQLite
|
# SQLite
|
||||||
@ -46,3 +46,11 @@ SMTP_PORT="25"
|
|||||||
# SMTP_PASSWORD=""
|
# SMTP_PASSWORD=""
|
||||||
SMTP_TLSTYPE="none"
|
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
|
||||||
|
```
|
||||||
|
12
cli/Cargo.toml
Normal file
12
cli/Cargo.toml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[package]
|
||||||
|
name = "cli"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "db"
|
||||||
|
path = "src/db.rs"
|
||||||
|
|
||||||
|
[dependencies]
|
3
cli/src/db.rs
Normal file
3
cli/src/db.rs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fn main() {
|
||||||
|
println!("abc");
|
||||||
|
}
|
1
cli/src/lib.rs
Normal file
1
cli/src/lib.rs
Normal file
@ -0,0 +1 @@
|
|||||||
|
pub mod db;
|
Loading…
x
Reference in New Issue
Block a user