In short: is it possible to reload static resources using akka-http?
A bit more:
getFromDirectorydirective instead when running locally and point it to the path where your files you want to 'hotload' are, it serves them directly from the file system, so every time you change a file and load it through Akka HTTP it will be the latest version.
getFromResourceDirectoryloads files from the classpath, the resources are available because SBT copies them into the class directory under
targetevery time you build (
copyResources). You could configure sbt using
unmanagedClasspathto make it include the static resource directory in the classpath. If you want to package the resources in the artifact when running
packagehowever this would require some more sbt-trixery (if you just put
unmanagedClasspathit will depend on classpath ordering if the copied ones or the modified ones are used).