This is an example repo that shows how i would implement a REST API using the Rust programming language.
!! To run this project you must have Rust installed on your system !!
Run these commands:
openssl genpkey -algorithm ed25519 -out keys/private.pemopenssl pkey -in keys/private.pem -pubout -out keys/public.pem
- For SQLx to work properly, you also need to have a database.
- Run
docker compose up postgres -dto start a development database.
- Run
- Full out a
.envfile with the.env.examplevariables. - Migrate your database with
SQLx(sqlx migrate dev). - Run the command
cargo run.
- Run
docker compose up -dto start the project running in the background.