https://kotlinlang.org logo
Title
a

Alexander Suraphel

01/20/2022, 10:38 AM
I’m reading how to serve static content with ktor. In the snippet below:
routing {
static("assets") {
files("css")
files("js")
}
}
Does
files("css")
look for the folder
css
and/or files with the extension
.css
?
b

Big Chungus

01/20/2022, 10:59 AM
Folder
./css
a

Alexander Suraphel

01/20/2022, 11:00 AM
@Big Chungus i just put a js script inside
./css
and it wasn’t served because it didn’t have .css extension though
actually it was from
resources("css")
not files but I’m not sure what the difference is..
@Big Chungus you’re right with
static
that’s how it works. It’s folder based. Thanks