Testing out simple Rust web-framework by creating an authentication service using Axum and Postgres.
- To begin, fill the necessary environment variables in the
.env
file. - Run the Postgres database locally using Docker:
docker run --name postgres -e POSTGRES_PASSWORD=[your password] -p 5432:5432 -d postgres
- To perform the migration, install
sqlx-cli
:
cargo install sqlx-cli
- Run the migration:
sqlx migrate run
- Run the server:
cargo run