https://github.com/wpcodevo/rust-axum-postgres-api
Are you interested in building a Rust API with CRUD functionalities using the Axum framework and PostgreSQL database? If so, you're in the right place! In this article, I will guide you through building a functional note-taking application API using Rust, Axum, SQLX, and PostgreSQL.
https://github.com/wpcodevo/rust-axum-postgres-api
axum axum-framework postgres postgresql rust sqlx
Last synced: 16 days ago
JSON representation
Are you interested in building a Rust API with CRUD functionalities using the Axum framework and PostgreSQL database? If so, you're in the right place! In this article, I will guide you through building a functional note-taking application API using Rust, Axum, SQLX, and PostgreSQL.
- Host: GitHub
- URL: https://github.com/wpcodevo/rust-axum-postgres-api
- Owner: wpcodevo
- Created: 2023-03-30T17:26:47.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-09T18:33:28.000Z (over 1 year ago)
- Last Synced: 2025-03-27T09:11:33.975Z (about 1 month ago)
- Topics: axum, axum-framework, postgres, postgresql, rust, sqlx
- Language: Rust
- Homepage: https://codevoweb.com/rust-crud-api-example-with-axum-and-postgresql/
- Size: 28.3 KB
- Stars: 61
- Watchers: 1
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rust CRUD API Example with Axum and PostgreSQL
Are you interested in building a Rust API with CRUD functionalities using the Axum framework and PostgreSQL database? If so, you're in the right place! In this article, I will guide you through building a functional note-taking application API using Rust, Axum, SQLX, and PostgreSQL.

## Topics Covered
- Run the Axum PostgreSQL API Locally
- Run the Axum API with a Frontend Application
- Setup the Axum and Rust Project
- Setup Postgres and pgAdmin Servers with Docker
- Run Database Migrations with SQLx-CLI
- Connect to the Postgres Server with SQLx
- Create the SQLX Database Model
- Create the Request Validation Structs
- Implement the CRUD Functionalities
- Axum Route Handler to Fetch All Records
- Axum Route Handler to Add a Record
- Axum Route Handler to Fetch a Record
- Axum Route Handler to Edit a Record
- Axum Route Handler to Delete a Record
- The Complete Axum Route Handlers
- Create the CRUD API Endpoints
- Register the Axum Router and Setup CORS
- ConclusionRead the entire article here: [https://codevoweb.com/rust-crud-api-example-with-axum-and-postgresql/](https://codevoweb.com/rust-crud-api-example-with-axum-and-postgresql/)