Web & 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.
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:/