Running with SBT
Requirements
- RDFShape API requires SBT to be built
Interactive mode with SBT
The way to familiarize yourself with the software is to run the sbt command, which will open the sbt shell,
and execute commands from there.
- Clone this repository
- Go to directory where RDFShape API source code is located and execute
sbt. After some time downloading dependencies and compiling the source code, the sbt shell will launch if everything went right. - From this point, you may execute several commands from the sbt shell:
runfor the API to launch and be accessible at localhost:8080.run --helpto see the help menu with further usage information.
Binary mode
The fastest way to run RDFShape API is to compile the code and generate an executable file:
- Clone this repo and run
sbt, as seen above. - From the sbt shell, run
Universal/packageBin. - A zip file with an executable and all the program dependencies will be created
inside
(ProjectFolder)/target/universal.
Serving with HTTPS
You can serve RDFShape API with HTTPS in 2 ways:
- [Recommended] Web server setup:
- Run a web server (i.e., Nginx) in your machine or in a separate container and configure it as a reverse proxy that forwards incoming requests to the API. Configure your web server to use HTTPS to communicate with clients.
- Launch the application normally (no
--httpsis required, the web server will handle it).
- Manual setup:
- Set the following environment variables in your machine/container, so it can search and use your certificates in
a Java keystore:
KEYSTORE_PATH: location of the keystore storing the certificate.KEYSTORE_PASSWORD: password protecting the keystore (leave empty if there is none).KEYMANAGER_PASSWORD: password protecting the certificate (leave empty is there is none).
- Launch the application with the
--httpsargument.
- Set the following environment variables in your machine/container, so it can search and use your certificates in
a Java keystore: