add short readme

This commit is contained in:
Sebastian Hugentobler 2024-07-10 15:10:14 +02:00
parent 052b6ac077
commit 23ed80aa4b
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0

37
README.md Normal file
View File

@ -0,0 +1,37 @@
# Hesinde Sync
A reimplementation of the
[Koreader Sync Server](https://github.com/koreader/koreader-sync-server) because
I wanted to try
[poem openapi](https://docs.rs/poem-openapi/latest/poem_openapi/).
# Building
## Nix
A [nix](https://nixos.org/download/) environment with enabled
[nix-commands](https://nixos.wiki/wiki/Flakes) in order to use `nix develop`.
Run `nix develop` to be dropped into a shell with everything installed and
configured. From there all the usual `cargo` commands are accessible.
## Classic
A recent [rust](https://www.rust-lang.org/learn/get-started) installation is all
that is needed.
From there on `cargo run` and `cargo build` and so on can be used.
# Usage
```
Usage: hesinde-sync [OPTIONS]
Options:
-a, --address <ADDRESS> Address to listen on [env: ADDRESS=] [default: localhost:3030]
-d, --db-connection <DB_CONNECTION> From which file to read the database connection string ("-" for stdin) [env: DB_CONNECTION=] [default: -]
-h, --help Print help
-V, --version Print version
```
The url for koreader is `http://<ADDRESS>/api`.