Mô tả

Rust is a systems programming language which you can use to write applications with high performance. It is amazingly refreshing with a very helpful compiler who is your mentor since the very beginning.

Cargo is not only a package manager but also a build tool, a documentation generator and a lot more, making your every day managing Rust apps really easy.

It is no wonder that for these reasons, plus many more, Rust was voted as StackOverflow’s most loved and desired programming language, eight years in a row.


You have already spent a good amount of time developing web applications and you have a very good understanding of Rust.

You are beyond the point of simple, toy applications and you are ready to start doing some serious back-end web development and you are wondering whether Rust can be used for this purpose.

You are looking for a resource that has all you need in a single place.


Well, look no further! In this course i will show you how to create a complex, fully async web app in Rust that serves JSON APIs but also has a CLI interface at the same moment.


We will use the Rocket web framework along with the Diesel ORM to build Rest APIs with

- Authentication built-in (users and passwords)

- Redis as a cache storage

- Access management with roles

- Handling for datetime fields

- CLI commands

- Logging

- Automated API testing

Bạn sẽ học được gì

Implementing an authentication service in a Rocket REST API

Managing database entities with complex fields and relationships using async Diesel and PostgreSQL

Implementing a cache database with Redis

Session handling and granular access management for different endpoints

Testing API endpoints in an automated way

Sending HTML emails with lettre and tera

Writing CLI commands with clap

Yêu cầu

  • Good knowledge of Rust
  • Familiarity with docker and docker-compose
  • Understanding of HTTP, REST and JSON
  • Experience with SQL and ORMs in general

Nội dung khoá học

9 sections

Introduction

3 lectures
Introduction
10:10
Local setup
13:12
Gitlab repository
00:15

Database

2 lectures
Migrations and models
19:06
Repositories
19:02

Web server

3 lectures
Rocket setup
19:47
Rustacean endpoints
33:40
Crate endpoints
13:49

Tests

4 lectures
Rustacean endpoint tests
28:53
Crate endpoint tests & logging
29:51
Logging and a few more test cases
12:48
Add even more test cases
2 questions

Command Line Interface

6 lectures
User/Role models and relationship
12:05
Users management CLI command
23:16
Create user command
19:26
Assigning roles to user
26:08
List and delete users
18:26
Password hashing
06:13

Authentication

9 lectures
Login endpoint
17:58
Generating session IDs
17:13
Redis setup
07:36
Redis key/value set with expiry
22:30
Login endpoint fixes
1 question
Making routes private
33:43
Adding yet another test
2 questions
Role code as an enum
19:32
Access levels based on roles
19:22

Emails

3 lectures
Lettre and tera for email sending
28:29
Email module and cleanup
18:07
Mail module refinement
2 questions

Bonus

2 lectures
CORS handling
17:09
Me endpoint
07:42

Outro

1 lectures
Recap and goodbye
02:29

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.