Web, SSH & gRPC Server ๐คต¶
UI¶
$ ./enola server --load="docs/models/example.org/*.ttl" --httpPort=8080
HTTP JSON REST API + HTML UI server started; open http://[0:0:0:0:0:0:0:0]:8080/ui ...
You can now open e.g. http://localhost:8080/ui to view the UI, and navigate its links e.g. from e.g. http://[::]:8080/ui/https://example.org/greeting2 to http://[::]:8080/ui/https://example.org/world.
REST¶
There is also a REST API which returns JSON if you replace ui
with api
in the URL,
so e.g. on http://[::]:8080/api/https://example.org/greeting2.
SSH¶
$ ./enola server --load models/enola.dev/enola.ttl --httpPort=9090 --sshPort=2222
(...)
SSH server running on port 2222
You can now connect to Chat, e.g. with ssh -p 2222 alice@localhost
.
Only public key authentication is supported, no passwords. All public keys are accepted. Any username (e.g. alice@
) can be used.
The host (private) key is stored e.g. in ~/.config/enola/sshd-hostkey
.
gRPC¶
The --grpcPort
flag starts the Enola gRPC API.
This can be used by the Enola CLI Client’s --server
flag, instead of passing a --load
file, like so:
$ ./enola server --load="docs/models/example.org/*.ttl" --grpcPort=7070
gRPC API server now available on port 9090
$ ./enola get --server localhost:7070 enola:/
This is the same as a direct “in-process” Get Entity would have:
./enola get --load="docs/models/example.org/*.ttl" enola:/