We are going to create a fullstack web application with Rust. We are going to use the following tools/frameworks,
- Backend: Actix-Web - https://actix.rs/
- Migrations: Sea-ORM - https://www.sea-ql.org/SeaORM/
- Database: PostgreSQL - https://www.postgresql.org/
- Templates: Tera - https://keats.github.io/tera/docs/
- Frontend: Svelte - https://svelte.dev/
We will also use redis, Docker/Docker Compose and also try to incorporate RabbitMQ.
Let's get started.
- Initial Project Setup
- Logging
- Reading application defaults from .env
- Making the application Modular
- Returning JSON response
- Updating the logger
- Adding a Database to Persist Data
- Adding Sea-ORM
- Sea-ORM: Creating Models and Entities
- Adding missing field to a Model
- Updating the entity
- Adding the users module
- Adding Admin fields to User
- The User API
To run the server, rename the example dot.env
to .env
and set the expected values to your suitable default. Here is
an example for running locally,
# application
HOST=127.0.0.1
PORT=8080
# database
DATABASE_URL=postgres://postgres:password@localhost/actix-fullstack
From the terminal, navigate to application directory. From inside the directory, hit cargo run
. Your server should be
up and running and should be available to you at http://localhost:8080 or http://127.0.0.1