https://github.com/thorstenhans/spin-todo-api
https://github.com/thorstenhans/spin-todo-api
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/thorstenhans/spin-todo-api
- Owner: ThorstenHans
- Created: 2025-08-15T10:45:13.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-15T12:33:38.000Z (11 months ago)
- Last Synced: 2025-10-28T10:52:19.995Z (8 months ago)
- Language: Rust
- Size: 14.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spin ToDo API
This [Spin](https://github.com/spinframework/spin) application exposes a super simple RESTful API for managing ToDo items.
The app uses key-value store for persisting items.
## API Endpoints
The following endpoints are exposed:
- `GET /api/todos` to retrieve the list of ToDo items
- `GET /api/todos/:id` to retrieve a single ToDo item using its identifier
- `POST /api/todos` to add a new ToDo item
- `POST /api/todos/:id/toggle` to toggle the state of a particular ToDo item using its identifier
- `DELETE /api/todos/:id` to delete a ToDo item using its identifier
## Building & Running the Spin application
To build and run the Spin application on your local machine, you must have the following installed:
- Spin CLI (`spin`) in version `3.3.1` or newer
- Rust in version `1.86.0` or newer including the `wasm32-wasip1` target
Run `spin build` to compile the application.
Run `spin up` to launch the application on your local machine (you can overwrite the default listener `localhost:3000` by providing the `--listen` argument).