โ† Writing

๐ŸŒ Actix-Web Server

2024-10-19 rust ยท actix_web ยท project


A lightweight backend service built with modern Rust web technologies, ideal for full-stack or API-centric applications.


๐Ÿ“š GitHub Repository

Tools

Rust Version actix_web Version tokio version sqlx version serde version Build status

This project showcases a RESTful backend service built with the Actix-Web framework, ideal for handling fast, asynchronous HTTP operations.

It uses modern, production-ready Rust technologies like:


๐Ÿ”ง Architecture Overview

Note Service is structured as a standalone binary crate designed to perform common backend tasks:


๐Ÿš€ Features


โš™๏ธ Installation & Setup

1. Install Rust (if not already):

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

2. Install sqlx CLI:

cargo install sqlx-cli --features sqlite

3. Prepare the database:

cargo sqlx prepare
cargo sqlx migrate run

4. Run the server:

cargo build
cargo run

5. Open your browser:

http://127.0.0.1:8080

๐ŸŒ API Endpoints

MethodEndpointDescription
GET/notesList all notes
GET/notes/{id}Get a specific note
POST/notesCreate a new note
PUT/notes/{id}Update an existing note
DELETE/notes/{id}Delete a note

๐Ÿ’ก Use Cases


๐Ÿ“„ License

This project is licensed under the MIT License โ€” free for personal or commercial use.