- Make sure rust is setup first
- Install/Update GCC
brew install gcc
- Install/Update libpq
brew install libpq
- Install the diesel cli
RUSTFLAGS='-L /opt/homebrew/opt/libpq/lib' cargo install diesel_cli --no-default-features --features postgres
- Copy
.env-sample
to.env
and define required values - Apply database migrations
diesel migration run
Command | Purpose |
---|---|
cargo run |
Run development server |
diesel migration generate [name] |
Create migration |
M1 users you might need add export RUSTFLAGS='-L /opt/homebrew/opt/libpq/lib'
to your bash profile