DEV Community

Cover image for Rust Web development | Boilerplate free with Rocket
Julio Daniel Reyes
Julio Daniel Reyes

Posted on

Rust Web development | Boilerplate free with Rocket

An overview of the Rocket web framework for rust.

  • Type Safe
  • Boilerplate Free
  • Easy to use
  • Extensible

Including examples:

  • Create a Hello World service
  • Create a TODO service with a Postgres database using Diesel ORM.

⏱️TIMESTAMPS⏱️
0:00 Rust Web development with Rocket
0:07 What is Rocket?
0:49 Rocket overview
3:32 A couple of things to consider before using Rocket
4:22 Building a Hello World service
8:37 Define custom configuration
9:29 Building a TODO service with a Postgres database
9:34 Setup a Database service using Docker and Docker Compose
10:12 Diesel to manage database migrations
12:19 Diesel and Serde dependencies
12:58 Rearrange the endpoints
13:20 Use the Schema file generated by Diesel
13:47 Define the models for the TODO service
15:04 Define handler to create new TODOs
15:52 How to get a DB connection with Rocket?
17:09 Create new TODO
18:00 Define handler to list all TODOs
18:54 Define the database configuration
19:20 Testing the TODO endpoints
20:27 Bonus: Define endpoint to mark a TODO as checked

📔 Source Code
https://github.com/nemesiscodex/hello-rocket

🚀 Rocket Web Framework
https://rocket.rs/

Top comments (1)

Collapse
 
inshalayaz profile image
Inshal Ayaz