πŸ¦€ Learning Rust web servers with Axum & SQLx (Twitch live stream)

Subscribers:
950
Published on ● Video Link: https://www.youtube.com/watch?v=lXiXdPmRqSk



Duration: 1:21:56
736 views
14


In this video, we explored the Axum web framework for the Rust programming language.

This is a follow-up to our previous live stream where we built a simple REST API that allows us to create and store simple textual notes in memory.

You can watch that episode here: https://youtu.be/Igajh2Vliog

In this episode, we improved the state management of our server by using Axum State extractor (https://docs.rs/axum/latest/axum/#sharing-state-with-handlers) and we added persistence on a SQLite database using the sqlx crate (https://github.com/launchbadge/sqlx).

The code is available here: https://github.com/lmammino/trying-axum

Chapters:

00:00:00 Intro
00:01:33 Reviewing the Axum documentation
00:02:18 Refactoring state with the State extractor
00:21:39 Our alternative approach to return Error responses (using Enums)
00:25:44 Looking at sqlx and setting it up in our project
00:37:00 A sample query with sqlx
00:57:00 Setting up our database with migrations through the CLI helper
01:01:28 Updating our code to use SQLite as a data storage
01:18:40 Testing our changes
01:20:40 Wrap up

To see the next episodes live check out our Twitch channel: https://twitch.tv/loige

#rust #Axum #sqlx




Other Videos By Luciano Mammino (loige)


2023-07-31Fixing Fullstackbulletin.com part 6 - Twitch Live Stream
2023-07-17Fixing Fullstackbulletin.com part 5 - Twitch Live Stream
2023-07-03Fixing Fullstackbulletin.com part 4 - Twitch Live Stream
2023-06-26Fixing Fullstackbulletin.com part 3 - Twitch Live Stream
2023-06-19Fixing Fullstackbulletin.com part 2 - Twitch Live Stream
2023-06-12Fixing Fullstackbulletin.com part 1 - Twitch Live Stream
2023-05-08Creating Node.js libraries with Rust using Neon (Twitch live stream)
2023-04-18Using Zig from Python 😱 (Twitch Live Stream)
2023-04-03πŸ¦€ Calling Rust from Python 🐍 with PyO3 (Twitch live stream)
2023-03-22πŸ¦€ Exploring Rust crates zip & image (Twitch live stream)
2023-02-27πŸ¦€ Learning Rust web servers with Axum & SQLx (Twitch live stream)
2023-02-21Rust crates: async_stream (Twitch live stream 2023-02-20)
2023-02-13Rust crates: custom serde deserializers (Twitch live stream 2023-02-13)
2023-02-09Rust crates: dotenv, reqwest, url, serde, serde-json (Twitch live stream 2023-02-08)
2023-01-23πŸ¦€ Learning Rust web servers with Axum (Twitch live stream)
2023-01-09πŸ¦€ Learning nom, a Rust parser combinator library (Twitch stream)
2022-11-30Building a Tic Tac Toe game in Solid.js (Twitch Live Stream 2022-11-30)
2022-11-28πŸ¦€ Building a 2D starship game in Rust with Bevy - PART 5 (asteroids)
2022-11-21πŸ¦€ Building a 2D starship game in Rust with Bevy - PART 4 (collisions)
2022-11-14πŸ¦€ Building a 2D starship game in Rust with Bevy - PART 3 (migrating to Bevy 0.9)
2022-11-10πŸ¦€ Building a 2D starship game in Rust with Bevy - PART 2



Tags:
rust
axum
rustlang
rustacean
web
web development
web framework
live coding
twitch
pairing
live pairing
english
coding
api
rest
restful
http
localhost
notes
project
building a web server with axum
Axum
sqlx
REST API
state management
Axum State extractor
SQLite database
sqlx crate
live stream
programming
GitHub
Twitch