This microservice provides a native, self-standing executable to serve Reveal.js presentations over HTTP.
- Simply download the executable for your given platform (Linux, Windows, Mac OSX are supported).
- Create a
www
folder to contain your presentation - Create a
resources
folder to contain your binary and static resources (images, reveal.js plugins etc...) - Create an
index.html
file inwww
to host your reveal.js presentation (Bonus : you can use Thymeleaf templating) - Note that all reveal.js resources are available under
/webjars/reveal.js/4.1.3/
, for instance :/webjars/reveal.js/4.1.3/dist/reveal.js
/webjars/reveal.js/4.1.3/plugin/notes/notes.js
/webjars/reveal.js/4.1.3/dist/reset.css
- Start the server with executing
reveal-microservice
and it will be available at http://localhost:8080/index.html
🗒 NOTE : Native compilation does not currently support the Webjars locator library, forcing us to use versioned URLs to access Reveal.js resources (c.f. Spring Framework issue 27619 and Webjars locator issue 96 )
This microservice is implemented using Spring Boot 3 and its amazing native image compilation support. As such, you can configure the microservice using any of the supported Spring Boot application properties.
All presentation templates are also Thymeleaf templates, which supports the injection of request parameters and other dynamic properties into your presentations.
One custom property available to you is the location of your reveal.js presentation (by default ./www/
), you can override this by adding a parameter to the microservice execution (for instance if your files are stored in ./my-custom-folder
) :
reveal-microservice --spring.thymeleaf.prefix=file:./my-custom-folder/
Please note that the path must end with a forward slash.
Static resources (e.g. images) are served from the folder ./resources/
, you can also adjust this location like so :
reveal-microservice --spring.web.resources.static-locations=./my-other-resource-location/
- Java 17 GraalVM 22.3+
- GraalVM Native image plugin
Using the provided Maven wrapper, simply call :
./mvnw package
You can then run the service with :
./mvnw spring-boot:run
To compile the native image, please refer to HELP.md.