Is there any way to hot-reload static files in Ktor?

Viewed 376

I've been following the ktor tutorial for making a website and notice that every time I make a change to a resource file, I have to recompile to see it updated in the browser. Is there any way to hot reload static files to speed up development? I'm using IntelliJ if it matters.

I believe Spring Boot has hot-swapping functionality explicitly for this purpose, I was just wondering if something equivalent for Ktor exists.

1 Answers

Ktor should be able to pick any new static content you provide. Since you are saying that recompilation is needed, I would propose to double-check if you are modifying the correct files (resulting artifact vs. the sources). If you are using the default template, you should be changing /build/resources/main/static in order for changes to take effect.

Related