https://kotlinlang.org logo
Join SlackCommunities
Powered by
# nodejs
  • v

    viliusk

    04/06/2017, 12:07 PM
    set the channel description: Kotlin and Node.js
  • v

    viliusk

    04/06/2017, 12:10 PM
    Anyone is using Kotlin for apps to be run on Node.js in production? Is it stable already? Would you recommend it for newly started projects?
  • k

    konsoletyper

    04/06/2017, 12:21 PM
    @viliusk did you try to?
  • v

    viliusk

    04/06/2017, 12:23 PM
    yesterday I've played with this tutorial
  • v

    viliusk

    04/06/2017, 12:23 PM
    https://medium.com/@Miqubel/your-first-node-js-app-with-kotlin-30e07baa0bf7
  • v

    viliusk

    04/06/2017, 12:23 PM
    looked simple and worked
  • k

    konsoletyper

    04/06/2017, 12:23 PM
    AFAIK, ts2kt runs in node.js. So you can ask @bashor about his experience.
  • v

    viliusk

    04/06/2017, 12:24 PM
    but I wonder what about large project?
  • v

    viliusk

    04/06/2017, 12:24 PM
    maybe at least 3y development will be needed
  • k

    konsoletyper

    04/06/2017, 12:24 PM
    That's bad tutorial. It shows how not to do in Kotlin
  • k

    konsoletyper

    04/06/2017, 12:25 PM
    For example, this
    Copy code
    external fun require(module:String):dynamic
    is a dirty hack, while Kotlin compiler can insert
    requre()
    automatically
  • v

    viliusk

    04/06/2017, 12:26 PM
    ah
  • k

    konsoletyper

    04/06/2017, 12:26 PM
    For example, you can do this way:
    Copy code
    @JsModule("express")
    external fun express(): dynamic
    Of course, you must declare this function outside
    main
    function
  • v

    viliusk

    04/06/2017, 12:27 PM
    where would you recommend newbies (java, android dev) to start creating backend with kotlin on Node.js?
  • k

    konsoletyper

    04/06/2017, 12:27 PM
    Another thing: there's ts2kt tool. You can try to use it to generate typed headers for this
    express
    module
  • k

    konsoletyper

    04/06/2017, 12:29 PM
    http://kotlinlang.org/docs/tutorials/javascript/working-with-javascript.html This is about browser environment, but it should not be very difficult to apply the same knowledge to write for node.js
  • k

    konsoletyper

    04/06/2017, 12:30 PM
    What kind of newbies do you mean? Are they newbies in Kotlin or in JavaScript/node.js?
    v
    • 2
    • 1
  • d

    djrausch

    04/09/2017, 11:28 PM
    @djrausch has left the channel
  • m

    mesquka

    04/26/2017, 2:23 PM
    @mesquka has left the channel
  • e

    enighma

    05/01/2017, 1:03 AM
    I can't get my gradle run configuration to work properly. I get this error
    Kotlin to JavaScript translator temporarily does not support multiple modules
    However if I run
    gradle build
    from command line I have no problems. Could someone explain why I get this error?
  • m

    mbstavola

    08/11/2017, 6:51 AM
    Has anyone used Kotlin JS with GSK/gradle-kotlin-dsl?
  • s

    Shiv Kumar

    08/25/2019, 6:14 AM
    Hey guys, I am working on a MERN project which is using google cloud to store images. In order to do that it requires gcloud permissions which can be acquired by
    GOOGLE_APPLICATION_CREDENTIALS
    environment variable setup along with other secret keys. Now, this env variable wants a path to JSON file which I get from gcloud which contains some sensitive data. It was easy to work with this on my local machine as I did setup the env variables but when I push it on Heroku it won't work because of this env variable. So my web app is unable to create objects in gcloud. Can someone help me out with this problem?
  • m

    Michael

    05/06/2021, 9:19 AM
    Is trhere any way to get kotlinx-nodejs now that jcenter is dead
    b
    • 2
    • 1
  • r

    rnett

    01/17/2022, 5:50 PM
    JCenter is causing issues for kotlinx-nodejs again, any chance of action on https://github.com/Kotlin/kotlinx-nodejs/issues/16?
    ✅ 2
  • l

    Leon

    10/27/2022, 6:37 PM
    I am trying to import
    NPM
    module from Kotlin/JS project. I followed this guide. https://kotlinlang.org/docs/js-react.html#add-the-video-player-component In the same way, I am trying to import
    recharts
    from
    NPM
    , but in the
    main.kt
    file, I can’t import recharts and it’s submodules. Please somebody help me regarding this if you’d like to do it.
    a
    • 2
    • 9
  • a

    Andrew Kuryan

    02/05/2023, 9:10 PM
    Hello guys, how can we pass command line args to the
    main
    fun of our program using the
    nodeRun
    gradle command? Using the
    --args="…"
    , like in jvm
    run
    , I receive an “Unknown command-line option ‘--args’” error
  • z

    Zyle Moore

    05/17/2024, 5:58 AM
    Hey everyone, just wanted to confirm, the current way to interact with the nodejs api, like the filesystem, is with the kotlinx-nodejs package, which is still experimental, correct?
    • 1
    • 1