Backend for the first run of our training for Hackathon 2023.
- Rust (nightly)
- Docker
- docker-compose
-
- This project requires the
nightly
version of Rust. If it's not installed on your system yet, you can run this command to install it:
- This project requires the
rustup toolchain install nightly
-
- While inside the project directory, run the following command to use the
nightly
version of Rust for the project:
- While inside the project directory, run the following command to use the
rustup override set nightly
-
- Install the
diesel_cli
- Install the
cargo install diesel_cli --no-default-features --features postgres
-
- While Docker is running Run the postgres database with docker-compose
docker-compose up -d postgres
-
- Run migrations to update the database
DATABASE_URL=postgres://rocket:rocket@localhost:5432/rocket diesel migration run
-
- Start the server
cargo run
-
- Open your browser at
http://127.0.0.1:8000/
.
- Open your browser at