Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 880 Bytes

README.md

File metadata and controls

44 lines (27 loc) · 880 Bytes

Starting the DB

# Start postgresql server docker image:
docker run --rm --name pg -p 5432:5432 \
   -e POSTGRES_PASSWORD=welcome \
   postgres:15


docker exec -it -u postgres pg psql

Dev (watch)

NOTE: Install cargo watch with cargo install cargo-watch.

# Terminal 1 - To run the server.
cargo watch -q -c -w crates/services/web-server/src/ -w crates/libs/ -w .cargo/ -x "run -p web-server"

# Terminal 2 - To run the quick_dev.
cargo watch -q -c -w crates/services/web-server/examples/ -x "run -p web-server --example quick_dev"

Unit Test (watch)

cargo watch -q -c -x "test -- --nocapture"

# Specific test with filter.
cargo watch -q -c -x "test -p lib-core test_create -- --nocapture"

Unit Test

cargo test -- --nocapture

cargo watch -q -c -x "test -p lib-core model::task::tests::test_create -- --nocapture"