Zero to Production

Code written while reading the book "Zero to Production" by Luca Palmieri.

Setup

  1. git clone git@github.com:pmuens/zero-to-production.git
  2. asdf install
  3. direnv allow
  4. ./scripts/setup.sh
  5. Run ./scripts/docker_dev.sh in terminal #1
  6. Run ./scripts/init_db.sh in terminal #2
  7. Run ./scripts/dev.sh in terminal #2

Useful Commands

asdf install
asdf reshim rust
direnv allow

cargo init
cargo new <name> [--lib]

cargo build [--bin <binary>]
cargo clean
cargo test
cargo bench

cargo update
cargo add <name>
cargo search <name>

cargo run [--bin <binary>] [-- arg]

cargo doc [--open]
cargo fix
cargo fmt
cargo clippy
cargo check

cargo install <name>
cargo uninstall <name>

sqlx database create
sqlx migrate add <name>
sqlx migrate run

Useful Resources