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

Alex Styl

11/11/2021, 8:55 AM
I use the html DSL to return html on requests on my ktor server. Right now I have a mix of kotlin html and it links to javascript files (similar to how you would have in a plain old html). I noticed that there is a kotlin/js wrapper (?). Is it somehow possible to use kotlin 100% and get rid of the javascript files entirely?
a

Aleksei Tirman [JB]

11/11/2021, 10:20 AM
Yes, you can use Kotlin for JS targets (NodeJS and Browser). For more information please see https://kotlinlang.org/docs/js-overview.html.
a

Alex Styl

11/11/2021, 12:56 PM
Something that is not clear for me looking at the link is whether I need to use a js framework if i am to do this. I see examples with react for example, but nothing about plain old js
a

Aleksei Tirman [JB]

11/11/2021, 1:58 PM
Here is the documentation about setting up a Kotlin/JS project. You don't have to use React or any other frameworks.
6 Views