Skip to content

Instantly share code, notes, and snippets.

@miquelbeltran
Last active March 19, 2017 22:29
Show Gist options
  • Select an option

  • Save miquelbeltran/2b82ed8272a740efd7d64053a61b77d8 to your computer and use it in GitHub Desktop.

Select an option

Save miquelbeltran/2b82ed8272a740efd7d64053a61b77d8 to your computer and use it in GitHub Desktop.
external fun require(module:String):dynamic
fun main(args: Array<String>) {
println("Hello JavaScript!")
val express = require("express")
val app = express()
app.get("/", { req, res ->
res.type("text/plain")
res.send("i am a beautiful butterfly")
})
app.listen(3000, {
println("Listening on port 3000")
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment