Creating an API server in Rust with Rocket, SeaORM and JWT

Build your own REST API server with the safety and performance of Rust using Rocket, SeaORM and JWT authentication.

4.45 (20 reviews)
Udemy
platform
English
language
Web Development
category
instructor
Creating an API server in Rust with Rocket, SeaORM and JWT
238
students
2 hours
content
May 2023
last update
$69.99
regular price

What you will 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

Why take this course?

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:

  1. Rocket: a web framework for Rust that makes it simple to write fast, secure web applications without sacrificing flexibility, usability, or type safety.

  2. SeaORM: is a relational ORM to help you build web services in Rust.

  3. jsonwebtoken to create and decode JWTs in a strongly typed way.

  4. serde_json for serializing and deserializing Rust data structures efficiently and generically.


Screenshots

Creating an API server in Rust with Rocket, SeaORM and JWT - Screenshot_01Creating an API server in Rust with Rocket, SeaORM and JWT - Screenshot_02Creating an API server in Rust with Rocket, SeaORM and JWT - Screenshot_03Creating an API server in Rust with Rocket, SeaORM and JWT - Screenshot_04

Reviews

Zahid
June 17, 2023
An exceptional course on building API servers in Rust. Clear explanations and practical examples - and easy to understand even if you have never used Rocket before.
Mahmoud
April 27, 2023
So far the the course is very well understood but the text of the IDE is small and has me straining my eyes to follow along.

Charts

Price

Creating an API server in Rust with Rocket, SeaORM and JWT - Price chart

Rating

Creating an API server in Rust with Rocket, SeaORM and JWT - Ratings chart

Enrollment distribution

Creating an API server in Rust with Rocket, SeaORM and JWT - Distribution chart
5222646
udemy ID
3/20/2023
course created date
7/5/2023
course indexed date
Bot
course submited by