https://github.com/rodolfoghi/actix-todo
To-do list web API using https://actix.rs
https://github.com/rodolfoghi/actix-todo
Last synced: about 1 month ago
JSON representation
To-do list web API using https://actix.rs
- Host: GitHub
- URL: https://github.com/rodolfoghi/actix-todo
- Owner: rodolfoghi
- License: mit
- Created: 2020-02-13T21:32:30.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-17T17:58:54.000Z (about 5 years ago)
- Last Synced: 2025-01-22T23:11:18.607Z (3 months ago)
- Language: Rust
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# To-do list web API using ACTIX
A simple web API that can manage "to-do" items stored in a database, using the Rust Web Framework [Actix](https://actix.rs).
# Usage
## Prerequisites
```
$ rustc -V
# rustc 1.41.0 (5e1a79984 2020-01-27)
``````
$ cargo -V
# cargo 1.41.0 (626f0f40e 2019-12-03)
```## Server
From the root directory of this project:
```
cargo run
# Started http server: 127.0.0.1:8080
```## Web client
With REST client like [Postman](https://www.postman.com/), [Insomnia](https://insomnia.rest/) and others.
| API | Description | Request body | Response body |
| -------------------------- | ----------------------- | ------------- | -------------------- |
| GET /api/TodoItems | Get all to-do items | None | Array of to-do items |
| GET /api/TodoItems/{id} | Get an item by ID | None | To-do item |
| POST /api/TodoItems | Add a new item | To-do item | To-do item |
| PUT /api/TodoItems/{id} | Update an existing item | To-do item | None |
| DELETE /api/TodoItems/{id} | Delete an item | None | None |# Resources used to learn how to do this project
* [Actix web rust web framework](https://actix.rs)
* [Actix web examples](https://github.com/actix/examples)
* [Rust language web site](https://www.rust-lang.org/)
* [The Rust Programming Language book](https://doc.rust-lang.org/book/)
* [The Cargo Book](https://doc.rust-lang.org/cargo/index.html)# License
This project is licensed by MIT license (http://www.apache.org/licenses/LICENSE-2.0)
# Contribute
Welcome to contribute!