25 releases

0.10.7 Nov 2, 2024
0.10.6 Sep 18, 2023
0.10.5 May 18, 2023

#246 in HTTP server

MIT license

68KB
1.5K SLoC

Todors

TODO app, mainly for a practical learning experience of Rust

Code Size codecov Repo Size Docs Language Count Commit Intervals Last Release GitHub Repo stars GitHub Release Downloads Cargo Crate Crate Download Docker pulls Docker Image License

Installation

Cargo

cargo install todors

Download binary

You can also head over to the GitHub release page and download the binary for your platform.

Docker

docker pull meysam81/todors
# or
docker pull ghcr.io/meysam81/todors

Usage

The usage is as follows:

todors serve grpc -p 50051 -H 127.0.0.1
todors serve http -p 8000 -H 127.0.0.1
# Both port & host are optional, but ipv6 can also be used
todors serve http -H ::1

todors create "My first todo"
todors list
todors update 1 --title "My first todo updated"
todors update 1 --done
todors update 1 --undone
todors delete 1

todors completion bash | sudo tee /etc/bash_completion.d/todors

REST API doc

Online

https://todors.fly.dev/docs/

Local

Run HTTP server
todors serve http
Visit URL

http://localhost:8080/docs/

gRPC API doc

Look at the proto files

proto directory

Run gRPC server

todors serve grpc
# exposed at localhost:50051

Help

Usage: todors <COMMAND>
Commands:
  serve       Serve either the gRPC or REST over HTTP server
  create      Create a new TODO with a title
  delete      Delete a TODO by ID
  list        List all TODOs
  update      Update a TODO by ID
  completion  Generate shell completion
  help        Print this message or the help of the given subcommand(s)
Options:
  -h, --help     Print help
  -V, --version  Print version

Dependencies

~39–59MB
~1M SLoC