Deno App Development with Kotlin

Deno Kotlin example

🦕 Deno development with Kotlin.

how to build project?

  • Build the project
$ ./gradlew deno

  • Run the code with Deno. Please add --no-check for Deno run to disable kotlin module check.
$ deno run --no-check build/deno/@appName@.js

How to invoke Deno stdlib?

  • Declare “external fun” for Kotlin in src/main/kotlin/deno/lib.std.kt
  • Add imports in “buildSrc/src/scripts/deps.js”

Import other npm packages or Deno modules

  • Use dukat to generate Kotlin declarations from xxx.d.ts or maintain manually
  • import Deno modules in deps.js
  • import npm packages in deps.js by

Use Kotlinx Coroutines library

  • add dependency in build.gradle.kts
implementation("org.jetbrains.kotlinx", "kotlinx-coroutines-core", "1.3.9")

  • Add kotlinx-coroutines-core import in templates.js
import Kotlin from ""
import KotlinxCoroutinesCore from ""


function require(moduleName) {
  if (moduleName === 'kotlin') {
    return Kotlin
  } else if (moduleName === 'kotlinx-coroutines-core') {
    return KotlinxCoroutinesCore;
  } else {
    return {};

Dev Tips

  • Enables continuous build: re-execute tasks when task file inputs change
$ ./gradlew -t deno

  • deno run --watch flags to watch file changes. Deno 1.4.0+ required
$ deno run --unstable --watch --allow-read --no-check build/deno/@appName@.js


Download Details:

Author: tgm-templates


Source Code:

#deno #nodejs #node #javascript #kotlin

Deno App Development with Kotlin
2.65 GEEK