A Rust Based Blog made with Rocket!
- Rust Nightly
- Postgres
- A Heroku Account
- A little bit of patience
cargo build
Since we're only using Postgres here, you'll want to install the Diesel CLI with just Postgres.
cargo install diesel_cli --no-default-features --features postgres
Diesel requires a live Postgres installation to run commands and configuration against. To accomplish this, we needed to build our containers first. To actually start modeling the database itself, run:
diesel setup
This will configure all of our database concerns. You may also have to run:
diesel migration run
to properly migrate all pending database concerns.
To launch the web app locally, you simply can run:
cargo run
Once you have the repo downloaded, you'll want to run the following:
heroku create --buildpack https://github.com/emk/heroku-buildpack-rust
heroku addons:create heroku-postgresql:hobby-dev
This will create a new Heroku app and install the Heroku Rust Buildpack. It will also provision a free version of Heroku Postgres - which we need for a database url. Right now, we need to install the master
branch of the buildpack in order for Diesel to work properly.