mirror of
https://github.com/LukeMathWalker/zero-to-production.git
synced 2024-11-24 01:31:00 +00:00
Scaffolding
This commit is contained in:
commit
7e63ca87bd
8 changed files with 55 additions and 0 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/target
|
||||||
|
.idea
|
||||||
|
tags
|
10
Cargo.lock
generated
Normal file
10
Cargo.lock
generated
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
[[package]]
|
||||||
|
name = "chapter03-0"
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "chapter03-1"
|
||||||
|
version = "0.1.0"
|
||||||
|
|
2
Cargo.toml
Normal file
2
Cargo.toml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
[workspace]
|
||||||
|
members = ["chapter03-0", "chapter03-1"]
|
16
README.md
Normal file
16
README.md
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# Zero To Production / Code
|
||||||
|
|
||||||
|
This repository complements the [Zero To Production book](https://www.lpalmieri.com/posts/2020-05-24-zero-to-production-0-foreword/): 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.:
|
||||||
|
```bash
|
||||||
|
# Run tests for the first part of Chapter 3
|
||||||
|
cd chapter03-0
|
||||||
|
cargo test
|
||||||
|
```
|
||||||
|
Alternatively, from the top-level folder, you can specify the binary you are interested into:
|
||||||
|
```bash
|
||||||
|
# Run the application as it is at end of the first part of Chapter 3
|
||||||
|
cargo run --bin chapter03-0
|
||||||
|
``
|
9
chapter03-0/Cargo.toml
Normal file
9
chapter03-0/Cargo.toml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[package]
|
||||||
|
name = "chapter03-0"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors = ["LukeMathWalker <rust@lpalmieri.com>"]
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
3
chapter03-0/src/main.rs
Normal file
3
chapter03-0/src/main.rs
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
fn main() {
|
||||||
|
println!("Hello, world!");
|
||||||
|
}
|
9
chapter03-1/Cargo.toml
Normal file
9
chapter03-1/Cargo.toml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[package]
|
||||||
|
name = "chapter03-1"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors = ["LukeMathWalker <rust@lpalmieri.com>"]
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
3
chapter03-1/src/main.rs
Normal file
3
chapter03-1/src/main.rs
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
fn main() {
|
||||||
|
println!("Hello, world!");
|
||||||
|
}
|
Loading…
Reference in a new issue