hesinde-sync/README.md

39 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2024-07-10 13:10:14 +00:00
# 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: -]
2024-07-10 13:26:35 +00:00
-a, --allow-registering Whether new users can register [env: ALLOW_REGISTERING=]
2024-07-10 13:10:14 +00:00
-h, --help Print help
-V, --version Print version
```
The url for koreader is `http://<ADDRESS>/api`.