This repository contains a sample project showcasing how to build a web application using Rust and Actix-Web. It is designed as a template for Daytona samples and adheres to the MIT License.
This sample demonstrates the following:
- Building a web server using Actix-Web
- Structuring a Rust web application project
- Using Daytona for standardized development workflows
Ensure you have the following tools installed:
- Rust (stable version) – Install Rust
- Daytona – Follow the Daytona Installation Guide
-
Install Daytona:
Follow the Daytona installation guide linked above. -
Create the Workspace:
Use Daytona to clone and initialize the sample project:daytona create https://github.com/ayimdomnic/daytona-rs-sample
-
Navigate to the Project Directory:
cd daytona-rs-sample
-
Run the Application:
Use Cargo to start the server:cargo run
-
Access the Application:
Open your browser and navigate tohttp://localhost:8080
(default).
This sample includes the following features:
- Basic Web Server: A simple Actix-Web server to handle HTTP requests.
- Modular Architecture: Clean separation of concerns with examples of routing and middleware.
- Development Environment: Preconfigured setup compatible with Daytona's devcontainers.
To adapt this sample to your needs:
- Modify the
src/main.rs
file to add your routes and handlers. - Update
Cargo.toml
to include additional dependencies. - Test your changes using the provided scripts or add your own test suite.
We welcome contributions! To propose a change:
- Fork the repository and create a feature branch.
- Make your changes and commit them with clear messages.
- Open a pull request for review.
This project is licensed under the MIT License. See the LICENSE file for details.