A very simple REST API written in Rust, powered by the actix-web
crate.
To compile the application for the current OS/architecture (WSL2 Ubuntu Linux for me):
cargo build --release
For cross-compiling from WSL2 to Windows:
- Install GCC compiler support for Windows systems:
sudo apt install gcc-mingw-w64
- Install the appropriate target:
rustup target add x86_64-pc-windows-gnu
- Compile the binaries:
cargo build --release --target=x86_64-pc-windows-gnu
http://localhost:8080
http://localhost:8080/todolist/entries
http://localhost:8080/todolist/entries
{
"title": "Title",
"date": 1665230864337
}
http://localhost:8080/todolist/entries/{id}
{
"title": "New Title"
}
http://localhost:8080/todolist/entries/{id}
- Import
thunder-collection_todolist_api.json
from.thunderclient
using the VSCode Thunder Client extension to load the requests/tests. - Make requests to the endpoints using the extension.
Alternatively, you can also use a tool like curl
.