If I understand correctly, with the release of Kotlin 1.1, we can set JavaScript as a compile target for full compilation to JavaScript of Kotlin projects. Is it possible (or feasible) to write an entire Node.js application, such as an express webserver, using only Kotlin code?
As this question suggests, we can import Node modules into Kotlin classes:
external fun require(module: String): dynamic
val express = require('express')
...which seems like I can create an application using:
val app = express()
Is this the Kotlin way to set up an express application? Or should I declare a class as described in the docs:
@JsModule("express")
external class Express { ... }
What is the canonical way to set up a Kotlin project for Node.js application development? Is Kotlin's JavaScript interoperability robust enough to continue down this path, or will it be more trouble than it's worth?