RevFilePlugin
A Ktor server plugin for automatically revisioning files based on their content.
package com.example
object AppAssets : RevFileRegistry("/assets/") {
val main: RevisionedFile = resource("main.js")
val styles: RevisionedFile = resource("styles.css")
}
fun Application.module() {
// No further routing setup required.
// For the final path use AppAssets.main.path throughout your app.
install(RevFilePlugin) {
+AppAssets
}
}
Content copied to clipboard