barrucadu / bookdb

A database and web app to keep track of all my books

Home Page:https://bookdb.barrucadu.co.uk/search

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bookdb

A database and web app to keep track of all my books, deployed to bookdb.barrucadu.co.uk.

Development

Install rustup and openssl, and then install the default toolchain:

rustup show

Then, compile in release mode:

cargo build --release

Run the unit tests with:

cargo test

With nix

Open a development shell:

nix develop

And run cargo commands in there.

Usage

Start up an Elasticsearch server and store the URL in the ES_HOST environment variable.

Initialise the Elasticsearch index and start the server in read-write mode:

export ES_HOST="..."
./target/release/bookdb_ctl create-index
./target/release/bookdb --allow-writes --upload-dir="<...>" <config file>

Omit the --alow-writes to launch in read-only mode.

Dump the Elasticsearch index as json to stdout with:

./target/release/bookdb_ctl export-index > bookdb.json

Restore it, overwriting the existing index:

./targets/release/bookdb_ctl import-index --drop-existing < bookdb.json

See the --help text for more.

About

A database and web app to keep track of all my books

https://bookdb.barrucadu.co.uk/search

License:Do What The F*ck You Want To Public License


Languages

Language:Rust 94.3%Language:CSS 4.0%Language:Nix 1.7%