7e763ee267
created with htpasswd from pkgs.apache2-utils + ensured the database is not seeded with test logins |
||
---|---|---|
.. | ||
.clj-kondo | ||
data/sample-data | ||
nix | ||
resources | ||
src | ||
test/beherbergung | ||
.gitattributes | ||
.gitignore | ||
DB.md | ||
project.clj | ||
README.md |
„beherbergung“ server
The core of the server is an graphql-api based on specialist.
As database the datalog implementation XTDB is used with a RocksDB data store. Some help how to access the database for development/debug purposes can be found in ./DB.md
Running development server
To start the server and send queries, run:
lein run
curl -H 'Content-type: application/json' -d '{"query":"{ TODO }"}' http://localhost:4000/graphql
Testing
lein test
Production build
lein ring uberjar
java -jar target/beherbergung-*standalone.jar
Reproducible builds
Whenever dependencies are changed, rebuild the mvn2nix-lock.json:
nix run ..#backendUpdatedDeps
This allows to build by:
nix build ..#backend
Configuration
Configuration management is done with yogthos.
Default values are set at src/config.edn
, there you see the available options.
In .lein-env.example
you find the variables you should set yourself.
To set config options at runtime, use environment variables
, java system properties
or an .edn file specified using the config
environment variable.
Notes to developers
State management
Global state (e.g. instances of database and webserver) are managed by mount.