aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-server-jooby/src/main
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2020-02-23 03:20:17 +0100
committerRobert Jaros <rjaros@finn.pl>2020-02-23 03:20:17 +0100
commitc437ce4f6dfb5c9182c188d1c9512d8d9d4db3a3 (patch)
tree5e415222a953dfcc3b1ed775bf781c1948463e09 /kvision-modules/kvision-server-jooby/src/main
parent15d445841245fff0aed6aa45daf0ea61391cfd68 (diff)
downloadkvision-c437ce4f6dfb5c9182c188d1c9512d8d9d4db3a3.tar.gz
kvision-c437ce4f6dfb5c9182c188d1c9512d8d9d4db3a3.tar.bz2
kvision-c437ce4f6dfb5c9182c188d1c9512d8d9d4db3a3.zip
Upgrade to Jooby 2.x
Diffstat (limited to 'kvision-modules/kvision-server-jooby/src/main')
-rw-r--r--kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt11
1 files changed, 7 insertions, 4 deletions
diff --git a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt
index b3da785d..73fcdadb 100644
--- a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt
+++ b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt
@@ -21,14 +21,17 @@
*/
package pl.treksoft.kvision.remote
-import org.jooby.Kooby
-import org.jooby.json.Jackson
+import io.jooby.AssetSource
+import io.jooby.Kooby
+import io.jooby.di.GuiceModule
+import io.jooby.json.JacksonModule
/**
* Initialization function for Jooby server.
*/
fun Kooby.kvisionInit() {
assets("/", "/assets/index.html")
- assets("/**", "/assets/{0}").onMissing(0)
- use(Jackson())
+ assets("/*", AssetSource.create(javaClass.classLoader, "assets"))
+ install(GuiceModule())
+ install(JacksonModule())
}