Course Information
Course Overview
Build your own REST API server with the safety and performance of Rust using Rocket, SeaORM and JWT authentication.
In this course, we'll create a REST API server in Rust to represent a bookstore. This bookstore would allow us to add books and authors.
Using this system, we'll be able to:
Create, list, update and delete authors
Create, list, update and delete books
Associate and disassociate books and authors
List all books by a particular author
We'll learn how to:
Create a new Rust project using cargo
Build and run our Rust project
Add crates and enable crate features
We'll learn about basic API concepts such:
Routing and HTTP methods
Extracting data from HTTP requests
Interacting with the database to query and insert data
Creating user accounts
Authentication using JWT
Creating and using relationships between models to query and list associated data
Along with these concepts, we'll learn how to:
Handle incoming (request) and outgoing (response) data in a type safe way
Handle CORS
Create and run database migrations
Create one-to-many database relationships
Create entities from database tables
We'll have a bonus lecture at the end to learn how to Dockerize our API server to deploy and run it anywhere.
We'll be using the following crates:
Rocket: a web framework for Rust that makes it simple to write fast, secure web applications without sacrificing flexibility, usability, or type safety.
SeaORM: is a relational ORM to help you build web services in Rust.
jsonwebtoken to create and decode JWTs in a strongly typed way.
serde_json for serializing and deserializing Rust data structures efficiently and generically.
Course Content
- 8 section(s)
- 43 lecture(s)
- Section 1 Introduction
- Section 2 Rocket: The web framework
- Section 3 SeaORM: Interacting with the database
- Section 4 REST API
- Section 5 Working with Rocket
- Section 6 Authentication and Sign Up
- Section 7 Implementing Controllers
- Section 8 Conclusion
What You’ll Learn
- Create a Rust project
- Create a REST API server using Rocket
- Interacting with a database using SeaORM
- Authenticating APIs using JWT
- Writing database migrations using SeaORM CLI
Skills covered in this course
Reviews
-
AAnders Sørensen
Just coding No explaintion of why and what could go wrong and how to fix issues that might come
-
RRyan Morales
Nice code and good editing
-
JJefri Tambunan
all course is great but i hope there is also support to upload pictures, multi threads to do multi task at once..
-
AAliaksei Ivanouski
I wanted to take a moment to thank you for the excellent course. It provided a clear, structured approach to building REST API services with Rust. I really appreciate the effort you put into it! It is highly recommended to anyone with experience building similar services in other languages who wants to learn Rust and its frameworks.