I am new to KotlinJs. I use IntelliJ for created p...
# javascript
p
I am new to KotlinJs. I use IntelliJ for created project and coding. It's my code
Copy code
external fun require(module: String): dynamic

fun main() {
    val express = require("express")
    val app = express()

    app.get("/") { _, res ->
        res.json("Success")
    }

    app.listen(3000) {
        console.log("Server is running...")
    }
}
'express' has data type dynamic, IDE does not support code completion.
r
IDE knows nothing about Express or any other JS library. You need to create (or find somewhere) Kotlin language bindings.
p
If it's not available, that's bad 😞
z
It is on kotlin 1.5.30, so I'm not sure how that will function with newer versions
r
It should work without problems