Any way to convince Jetty instance to hot reload when running via gradle?
See original GitHub issueI am using Gradle and the kotlin
and application
plugins to start my Javalin app. I would like to convince Gradle and Jetty to watch and build my code, and hot-reload the Jetty server.
I was hoping that Gradle’s “continuous build” feature could be used to trigger rebuilds, and that putting the Jetty server in debug mode
might help, but neither of those seem to work. The continuous build seems to be blocked by Jetty taking over the thread, and only works for other commands that “end”, such as my unit tests. Perhaps the debug params will only work with the Gradle jetty
plugin?
Anyway, I realize this isn’t really an issue with Javalin itself, but I was hoping someone in the community might have some insight on how I could improve my Javalin setup to allow for hot-reloads.
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (6 by maintainers)
Top GitHub Comments
@PascalLeMerrer For static files you don’t need to restart the server, you can either just build (will copy files to jar), or use
enableStaticFiles("/path", Location.EXTERNAL)
. If you use an external location, all you have to do is save and refresh.According to me, this would be an important feature to add to Javalin for it to be a nice backend for SPA development