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
wwwfolder to contain your presentation - Create a
resourcesfolder to contain your binary and static resources (images, reveal.js plugins etc...) - Create an
index.htmlfile inwwwto host your reveal.js presentation (Bonus : you can use Thymeleaf templating) - Note that all reveal.js resources are available under
/webjars/reveal.js/, for instance :/webjars/reveal.js/dist/reveal.js/webjars/reveal.js/plugin/notes/notes.js/webjars/reveal.js/dist/reset.css
- Start the server with executing
reveal-microserviceand it will be available at http://localhost:8080/index.html
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 23.0+ (normally ships with the
nativecomponent out of the box)
Using the provided Maven wrapper, simply call :
./mvnw package
You can then run the service with :
./mvnw spring-boot:run
You can compile a Native image with :
./mvnw -q -B native:compile -Pnative
For more details on how to compile the native image, please refer to HELP.md.
To release a new version, invoke the gitflow plugin like so :
./mvnw gitflow:release
It will prompt for the new version number, and increment all related Maven information, before pushing all updates.