mirror of
https://github.com/LukeMathWalker/zero-to-production.git
synced 2024-12-18 05:56:35 +00:00
Code for "Zero To Production In Rust", a book on API development using Rust.
f4ba849d91
* Bind to all interfaces When running under WSL2, binding only to localhost via the 127.0.0.1 address only lets you access the server from within WSL2 itself. It does not allow you to access the server from Windows. With this change, you can access the web server from the WSL ip address. You can find your WSL ip address with ``` $ ip a | grep eth0 4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 inet 192.168.161.12/20 brd 192.168.175.255 scope global eth0 ``` * Add comment about binding to localhost When running under WSL2, binding only to localhost via the 127.0.0.1 address only lets you access the server from within WSL2 itself. It does not allow you to access the server from Windows. Add a comment explaining how to work around this, by binding to all interfaces, instead of only to localhost. |
||
---|---|---|
.github/workflows | ||
chapter03-0 | ||
chapter03-1 | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
README.md |
Zero To Production / Code
This repository complements the Zero To Production book: 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.:
# 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:
# Run the application as it is at end of the first part of Chapter 3
cargo run --bin chapter03-0