diff --git a/README.md b/README.md index 683da91..9c9a79e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Zero To Production / Code +# Zero To Production / Code (Chapter 5)
@@ -6,15 +6,33 @@ This repository serves as supplementary material for [the book](https://zero2prod.com/): it hosts snapshots of the codebase of our email newsletter project at end of each chapter. -It is structured as a `cargo` workspace: running `cargo build` will build the codebase for **all** chapters. -If you want to build/test/run the code for a _specific_ chapter, just move into its folder! E.g.: +**This branch is a snapshot of the project at the end of Chapter 5.** + +## Pre-requisite + +You'll need to install: + +- [Rust](https://www.rust-lang.org/tools/install) +- [Docker](https://docs.docker.com/get-docker/) + +Launch a (migrated) Postgres database via Docker: + ```bash -# Run tests for the first part of Chapter 3 -cd chapter03-0 -cargo test +./scripts/init_db.sh ``` -Alternatively, from the top-level folder, you can specify the binary you are interested into: + +## How to build + +Using `cargo`: + ```bash -# Run the application as it is at end of the first part of Chapter 3 -cargo run --bin chapter03-0 +cargo build +``` + +## How to test + +Using `cargo`: + +```bash +cargo test ``` diff --git a/spec.yaml b/spec.yaml index 52c15fa..79076f5 100644 --- a/spec.yaml +++ b/spec.yaml @@ -9,7 +9,7 @@ services: dockerfile_path: Dockerfile source_dir: . github: - branch: ch-05 + branch: root-chapter05 deploy_on_push: true repo: LukeMathWalker/zero-to-production # Active probe used by DigitalOcean's to ensure our application is healthy