A database and web app to keep track of all my books, deployed to bookdb.barrucadu.co.uk.
Install rustup and openssl, and then install the default toolchain:
rustup showThen, compile in release mode:
cargo build --releaseRun the unit tests with:
cargo testOpen a development shell:
nix developAnd run cargo commands in there.
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.jsonRestore it, overwriting the existing index:
./targets/release/bookdb_ctl import-index --drop-existing < bookdb.jsonSee the --help text for more.