https://kotlinlang.org logo
#ktor
Title
# ktor
o

orangy

11/21/2017, 1:47 PM
👌 just use
resource
instead of
file
in static section
m

miha-x64

11/21/2017, 2:04 PM
println(String(javaClass.classLoader.getResourceAsStream("static/dashboard.css").readAllBytes()))
— OK, dumps file into log.
static { resource("static") }
/
GET /static/dashboard.css
— 404
c

cy

11/21/2017, 2:41 PM
shouldn't it be
resources()
instead of
resource()
? I believe that the second one does only serve single resource
file()
-
resource()
and
files()
-
resources()
👌 1
👍 1
o

orangy

11/21/2017, 3:17 PM
m

miha-x64

11/21/2017, 4:16 PM
Thanks!