一覧へ戻る
nemesiscodex/actix-todo(新しいタブで開きます)
主要言語: Rust
Todo list API made in rust + actix-web + tokio-postgres
- star 数
- 146
- watcher 数
- 8
- fork 数
- 20
- issue 数
- 0
- 最終更新
- 2025/08/13
主要言語: Rust
Todo list API made in rust + actix-web + tokio-postgres
A simple TODO list API built with Rust and Actix-web.
Note: This version is updated for Rust 1.87. The original code can be found in the
original-codebranch.
Setup environment
cp .env.example .env
Start database
docker-compose up -d postgres
Install dependencies
cargo install diesel_cli --no-default-features --features postgres
Setup database
DATABASE_URL=postgres://actix:actix@localhost:5432/actix diesel migration run
Run the server
cargo run
The API will be available at http://localhost:8080
| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Health check |
GET |
/todos |
List all todo lists |
GET |
/todos/{id} |
Get a specific todo list |
POST |
/todos |
Create a new todo list |
GET |
/todos/{id}/items |
Get items in a todo list |
GET |
/todos/{id}/items/{item_id} |
Get a specific item |
POST |
/todos/{id}/items |
Add item to a todo list |
PUT |
/todos/{id}/items/{item_id} |
Toggle item completion |
# Run tests cargo test # Run integration tests cargo test --features "integration"