I'm confused. I have a ktor project setup that is ...
# javascript
g
I'm confused. I have a ktor project setup that is serving up HTML and CSS via DSL but I can't for the life of me figure out how to make it serve of JS via DSL with the possibility of asynchronous calls back. I was thinking this was involved (https://ktor.io/clients/http-client/engines.html#cio) and I spent a few hours trying to get HTTPClient(JS) to work, but I think JS isn't written yet or something (https://github.com/ktorio/ktor/blob/master/ktor-client/ktor-client-js/js/src/Js.kt). To clarify, the following works... now how do I start using three.js with ktor via KotlinJS or ktro-client-js.
Copy code
call.respondHtml {
    head {
        title { +"Async World" }
        script {
            attributes["type"]=ScriptType.textJavaScript
            attributes["src"]="resource/three.min.js"
        }
    }
    body {
        h1 {
            attributes["id"]="title"
            classes = setOf("test")
            +"Title"
        }
        div{
            +"Testing Mode: $testing"
        }
    }
}
hmm... maybe I should just serve up a JS file? I need to modularize this app but kotlin multiplatform seems to want to organize by output file type.