A tutorial on creating a basic CRUD REST API with Rust, using the Axum framework and Postgres as the database.
Timestamps
00:00 Introduction
00:26 Creating your Postgres user and database.
01:28 Adding the crates we will make use of in the cargo.toml file.
02:40 The .env file for environment variables
02:55 How to get your Postgres database connection string.
03:23 Import struct, traits, functions, and macros into the program scope.
04:48 Working with environment variables.
08:13 Get/Read task API handler.
10:08 Post/Create task API handler.
13:15 Patch/Update task API handler.
15:30 DELETE task API handler.
17:34 Update task handler Revisited and Redesigned.
GitHub Repo: https://github.com/cudidotdev/Rust-ax...
Further reading
Axum order of extractors: https://docs.rs/axum/0.6.20/axum/extr...
#rust #axum #sql
Watch video Build a CRUD REST API with Rust Axum | Tutorial online, duration hours minute second in high quality that is uploaded to the channel cudidotdev 10 February 2024. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 14,163 times and liked it 419 visitors.