https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
server
  • d

    damian

    12/13/2017, 6:52 PM
    hey guys. i have a project with both backend and frontend module. both in kotlin - the backend with ktor, the frontend plain JS/JQuery, but im struggling with deploying both apps to for example heroku. does someone have experience with this / can help me out?
    j
    d
    • 3
    • 6
  • o

    orangy

    12/18/2017, 1:17 PM
    https://github.com/pronghorn-tech/server
    m
    • 2
    • 6
  • r

    ryotakei

    12/18/2017, 5:57 PM
    i know how to use ktor but i wanted to try Kara
    o
    • 2
    • 2
  • r

    ryotakei

    12/18/2017, 5:57 PM
    so in ktor you have
    embeddedServer(Netty, 8080)
    or something where you can "push" your ktor project to
    localhost:8080
    s
    • 2
    • 2
  • r

    ryotakei

    12/19/2017, 4:19 PM
    ive actually never done it, ive been using .css file for styling
    d
    • 2
    • 2
  • c

    cedric

    12/19/2017, 10:05 PM
    @orangy Quick question, why use strings and not enums:
    margin.left("auto")
    ? I could certainly use the autocompletion.
    ➕ 2
    o
    t
    • 3
    • 3
  • w

    Walter Meier

    12/22/2017, 4:23 PM
    So far I've only found bits and pieces on how to make GraphQL services in Kotlin, but nothing that seems to have wide support or documentation.
    g
    m
    • 3
    • 3
  • k

    katien

    12/23/2017, 9:03 PM
    Hey guys, yet another "which framework" question (sorry!) I've got experience doing back end development with Laravel, Express, and Rails. So far, I'm really liking rails and its tools for code generation. Rails does a lot for you and makes setting up an MVP/proof of concept very quick and painless. Are there any kotlin frameworks that are similar in this regard?
    n
    • 2
    • 7
  • b

    bdawg.io

    12/24/2017, 10:15 PM
    Honestly, I've had a much much easier time managing periodic tasks by executing them in AWS Lambda or Fargate
    n
    • 2
    • 2
  • a

    asad.awadia

    12/27/2017, 5:32 PM
    If i have a localhost http server [vert.x/ktor] exposed via port forwarding for a remote client - is there a way to restrict access by ip [something like htaccess]? i.e. only allow a particular ip or range of ips? [assuming i am not using ngrok or want to deploy to heroku/GAE]
    n
    • 2
    • 1
  • d

    damian

    12/28/2017, 2:31 PM
    does anyone have experiences with
    ktor
    ,
    exposed
    and authentication? i'm looking at the different options at the moment, would be nice to get some feedback. for
    OAuth
    i assume i have to set-up an oauth provider (given that im storing my users in my own database / accessed via
    exposed
    ), but not sure if there's a good way to do this in ktor. otherwise i'd probably go towards
    JWT
    since that's probably more straight-forward for now.
    👍 1
    q
    • 2
    • 1
  • b

    bdawg.io

    12/29/2017, 11:15 PM
    JWT with OAuth 2.0 is pretty awesome. You can validate the JWT is legit even before hitting the database with a user lookup
    d
    k
    d
    • 4
    • 6
  • l

    luisvt

    01/04/2018, 12:13 AM
    is there something similar to
    Groovy on Grails
    for kotiln?
    n
    g
    +2
    • 5
    • 9
  • j

    jw

    01/04/2018, 1:03 AM
    Kotlin on Kale
    😂 11
    n
    • 2
    • 1
  • r

    ryotakei

    01/04/2018, 4:35 PM
    i dont know if that made sense but itd be great if someone can help me out
    d
    d
    • 3
    • 3
  • d

    deviant

    01/05/2018, 8:35 AM
    hi guys! which one lib is more mature:
    exposed
    or
    squash
    ? it seems both serve for same purpose.
    exposed
    is being maintained extensively at first sight, has more stars on github and reasonable documentation. but
    squash
    is used in all recent JetBrains demo apps like
    kotlinconf-app
    or
    kotlin-fullstack-sample
    . what would you suggest for beginners?
    d
    d
    f
    • 4
    • 5
  • r

    rrva

    01/05/2018, 9:43 AM
    recommend me a URL parser in java that is not based on java.net.URL and not based on spring. Apache httpcomponents?
    k
    • 2
    • 2
  • v

    v79

    01/05/2018, 9:53 AM
    Of the three web server frameworks I've found in Kotlin - ktor, javelin and sparkjava-kotlin - are there any different design goals or use cases which would help me choose between them? I've been using spark-kotlin quite happily, and I'm looking to build straightforward web applications. But javelin in particular seems to sell itself as better than spark-kotlin.
    r
    d
    t
    • 4
    • 20
  • r

    RandomBK

    01/08/2018, 8:33 AM
    For the Java backend, I'm getting platform declaration clashes on classes extending
    Collection
    on methods that would normally be on the mutable Java
    Collection
    interface but not on Kotlin's read-only interface. The declaration collision is against a
    synthetic inheritor
    , which seems to be generated at https://github.com/JetBrains/kotlin/blob/master/compiler/backend/src/org/jetbrains/kotlin/codegen/CollectionStubMethodGenerator.kt
    o
    • 2
    • 1
  • o

    orangy

    01/08/2018, 10:50 AM
    What’s the default size for threading groups in your fav framework? Netty sets CPU*2. Jetty sets min(8), max(200). Undertow sets IO threads to #CPU, worker threads to #CPU*8. What do you use? Why?
    d
    • 2
    • 2
  • v

    velebak

    01/10/2018, 7:52 PM
    using ktor for a test app. Can anyone help with something odd?
    s
    • 2
    • 3
  • m

    Muthu

    01/14/2018, 4:56 PM
    I just started my first kotlin project using ktor referring
    <http://ktor.io/quickstart/gradle>
    I'm getting error
    Could not get unknown property 'ktor_version' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
    Below is the dependencies I'm using in build gradle file
    dependencies {
        compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
        compile "io.ktor:ktor-server-netty:$ktor_version"
        testCompile group: 'junit', name: 'junit', version: '4.12'
    }
    b
    • 2
    • 2
  • s

    s4nchez

    01/15/2018, 3:17 PM
    @g4sarma that's how we create an embedded Jetty in http4k:
    { request: Request -> Response(OK).body("Hello World") }.asServer(Jetty(8000)).start().block()
    g
    o
    • 3
    • 4
  • k

    kielpedia

    01/21/2018, 1:52 AM
    I have a ktor question if anyone is willing to help. Having trouble using
    withTestApplication
    in my unit test because I am using a system property in my App like
    val property = environment.config.property("randomproperty").getString()
    b
    d
    • 3
    • 4
  • f

    fabricio

    01/21/2018, 9:56 AM
    I have a weird behavior here with Spring Boot MongoDb. This document:
    @Document(collection = "schedules")
    data class ScheduleDocument(val payload: Payload) {
    }
    is stored as:
    {
      "_id" : ObjectId("5a636f2e5017622fc0c4654a"),
      "_class" : "example.Payload",
      "channel" : "push",
      "schedule" : ISODate("2018-01-20T16:32:46.535Z")
    }
    But I was expecting
    payload
    to be a subdocument, like this:
    {
      "_id" : ObjectId("5a636f2e5017622fc0c4654a"),
      "_class" : "example.ScheduleDocument",
      "payload": {
        "channel" : "push",
        "schedule" : ISODate("2018-01-20T16:32:46.535Z")
      }
    }
    can anyone explain this behavior?
    n
    • 2
    • 1
  • d

    damian

    01/21/2018, 1:57 PM
    i'm looking into sending email notifications from my backend (ktor, exposed), does someone have experience with this and can suggest me a library? i found a couple on github so far but not sure which way to go.
    n
    t
    v
    • 4
    • 12
  • o

    orangy

    01/23/2018, 7:20 AM
    You couldn’t have read that particular comment that fast, because it’s huge and thoughtful! Did you even click the link or just judging by the caption deciphered from URL?
    s
    • 2
    • 1
  • j

    Jimmy Alvarez

    01/23/2018, 4:08 PM
    Hello Guys, I'm training to run a Spring Boot application but when I try to compile it it seeds the following *None of the following functions can be called with the arguments supplied: public open fun run(p0: Any!, vararg p1: String!): ConfigurableApplicationContext! defined in org.springframework.boot.SpringApplication* Some ideas how can I solve it
    l
    • 2
    • 1
  • j

    jivimberg

    01/27/2018, 12:01 AM
    Hi guys, I’m doing a Kotlin app using Spring boot. The thing is gradle’s kotlin-jpa plugin doesn’t work when starting the Spring boot app from Intellij run. I’ve found a workaround here: https://stackoverflow.com/questions/43170391/no-default-constructor-for-jpa-entity-with-kotlin-even-with-noarg-plugin by running “gradle bootRun”. But I’d like to understand why it’s not working…
    • 1
    • 1
  • e

    elaborate tissue

    01/27/2018, 4:12 PM
    any suggestions on deserializing xml in kotlin? tried using jackson-dataformat-xml but i don't think its set up to work with kotlin classes
    n
    l
    • 3
    • 4
Powered by Linen
Title
e

elaborate tissue

01/27/2018, 4:12 PM
any suggestions on deserializing xml in kotlin? tried using jackson-dataformat-xml but i don't think its set up to work with kotlin classes
Nevermind, I'm getting some success with using jackson-dataformat-xml now!
n

napperley

01/28/2018, 2:27 AM
Remember to use the Jackson Kotlin module ( https://github.com/FasterXML/jackson-module-kotlin ) for proper Kotlin support.
👍 2
l

lex

01/29/2018, 3:39 AM
jackson xml works moustly strange
with java too
View count: 3