This project demonstrates how to build a web application using the Rocket framework in Rust with Diesel for database interactions. It’s designed for learning and exploration of the Rust ecosystem.
- Rust: The programming language.
- Rocket: A web framework for building web applications.
- Diesel: ORM for Rust.
- PostgreSQL: The relational database used.
core/rocket/
: Contains the Rocket application code.core/diesel/
: Contains the Diesel ORM and schema definitions.features/
: Contains the business logic and domain-specific code.
To run the application, follow these steps:
- Docker: Make sure Docker and docker compose are installed on your machine.
-
Build and Run Containers
Use Docker Compose to build and start the application and database containers:
docker-compose up --build
-
Access the Application
Once the containers are running, you can access the Rocket web application at http://localhost:8000.
- Running Diesel Migrations
If you need to manually run Diesel migrations, you can do so by exec-ing into the application container:
docker-compose exec app bash
diesel migration run
- Exploring the Rust language and ecosystem.
Distributed under the MIT License. See LICENSE.txt
for more information.