Skip to content

timonviola/zero2prod

Repository files navigation

My follow-along repo for the zero2prod rust book.

dev

run 'cargo watch -x check -x test -x run'

curl -X GET 127.0.0.1:8000/health

db migration

export DATABASE_URL=postgres://postgres:password@127.0.0.1:5432/newsletter sqlx migrate add create_subscriptions_table sqlx migrate run

with psql cli

docker exec -it postgres psql -h "localhost" -U postgres -p 5432 -d postgres -c '\c newsletter' -c '\d+ subscriptions'

test

start pg image: ./scripts/init_db.sh

cargo test

TEST_LOG=TRUE cargo test health_check_works | bunyan

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages