https://kotlinlang.org logo
Docs
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
  • g

    Gokul

    10/03/2018, 2:45 AM
    I am trying to setup test coverage on my spring-boot project with gradle. I have used `kotlintest`(https://github.com/kotlintest/kotlintest) as the testing framework. Any recommendations?? Thanks in advance.
    s
    v
    • 3
    • 4
  • j

    Jacol

    10/04/2018, 5:33 PM
    Hello all I am looking for a big project (sources) - full stack? On the basis of this project I would like to model myself and create my own
    k
    c
    • 3
    • 5
  • t

    TwoClocks

    10/06/2018, 10:40 PM
    I'm try to write a continuation that I can "call-back/continue" some time later at my chooesing. I'm trying to await on a CompletableFuture, but that doesn't seem to be pausing that "green thread". await it just returning a non-completed future. Anyone know what the trick is? Lots of docs on how to use yield & delay, but none on how to write you own.
    h
    • 2
    • 2
  • s

    sdeleuze

    10/09/2018, 11:51 AM
    I have talk about that with several people at Kotlinconf, but Pivotal has announced 2 weeks ago R2DBC which is an initiative to provide Reactive SQL drivers, with a PostgreSQL driver already available, and others likely to be later. I am working on Spring side to provide Coroutines API on top of that but https://github.com/r2dbc/r2dbc-client is only based on Reactor and could be easily exposed with a Coroutines API using https://github.com/Kotlin/kotlinx.coroutines/tree/master/reactive/kotlinx-coroutines-reactor for other Kotlin server side ecosystems. With https://github.com/Kotlin/kotlinx.coroutines/issues/284 it will even be possible to manage async transactions, and with https://github.com/Kotlin/kotlinx.coroutines/issues/254 you will be able to receive rows as streams.
    💯 1
    🎉 2
    👍 9
    l
    • 2
    • 1
  • m

    mp

    10/09/2018, 2:02 PM
    See #ktor btw but I'd probably run one service that listens on two ports for that case... it's basically vhosting but less of a pain (and easier to manage in local dev too -- no /etc/hosts modifications etc)
    p
    o
    • 3
    • 4
  • v

    voddan

    10/11/2018, 5:24 PM
    Hello! Has someone had a chance to compare Ktor and ExpressJS? Their approaches seem to be very similar.
    o
    d
    +2
    • 5
    • 12
  • e

    Edgars

    10/14/2018, 12:04 PM
    Hello! I have pretty much 0 (valuable) web dev experience. I don't know much about back- and front-end frameworks and whatnot. So pardon me if this is a stupid question, but how would I go about making a good-looking website using Ktor? From what I gather, Ktor is what I want for, say, routing, business logic, etc. What do I need to make a pretty front-end?
    n
    • 2
    • 3
  • e

    enleur

    10/14/2018, 12:31 PM
    check this https://github.com/Kotlin/kotlin-fullstack-sample
    👍 1
    n
    • 2
    • 1
  • o

    orangy

    10/15/2018, 11:49 AM
    Anyone tried http://www.vaadinonkotlin.eu/ ?
    l
    m
    +6
    • 9
    • 50
  • d

    Daniel Oliveira

    10/19/2018, 12:10 PM
    Hello everyone! I've been looking for an answer abot KTOR but can't find it anywhere: is KTOR a jvm-based server? I mean, I need a jvm to run it? (sorry if this is a dumb question, but server development is not my area).
    e
    d
    +3
    • 6
    • 7
  • q

    Quang Luong

    10/20/2018, 6:12 AM
    Show KN: I am trying to write a simple
    lwan
    (a web framework in C) wrapper in #kotlin-native. Any suggestion for how you design a web framework/want to structure your api?
    g
    • 2
    • 1
  • m

    Ming A Qi

    10/22/2018, 9:09 AM
    Hi all as we know jdk11 is not free,so can we use kotlin instead of java?
    😕 1
    o
    f
    +3
    • 6
    • 12
  • n

    nfrankel

    10/23/2018, 11:29 PM
    that’s not kotlin specific there should be no builder nor no new object instanciation in your class all dependencies should be (constructor-)injected
    h
    • 2
    • 1
  • e

    elizarov

    10/24/2018, 1:43 AM
    From the creators of Grails: http://micronaut.io
    ❤️ 9
    👀 3
    o
    k
    • 3
    • 4
  • á

    Álvaro Sánchez-Mariscal

    10/26/2018, 10:11 AM
    I have just created a #micronaut channel
    👍 3
    o
    • 2
    • 4
  • n

    Narayan Iyer

    10/27/2018, 4:07 PM
    Has anyone tried implementing json responses using
    KTOR
    ? Documentation is not clear!
    o
    m
    • 3
    • 3
  • k

    Kevin Huang

    11/07/2018, 4:16 AM
    I found coroutine in Kotlin 1.3 is using
    DefaultScheduler
    for it's default dispatcher, but it extend from the
    ExperimentalCoroutineDispatcher
    and not the
    CommonPool
    before. Is it suggested to use on online env?
    e
    • 2
    • 4
  • v

    Vinicius Volpe

    11/09/2018, 11:06 AM
    -.txt
    d
    • 2
    • 1
  • v

    Vinicius Volpe

    11/09/2018, 11:08 AM
    what I'm missing?
    d
    • 2
    • 1
  • v

    Vinicius Volpe

    11/09/2018, 3:20 PM
    @Jeff Gulbronson not really, I just found koin in my researchs and try to use that
    👍 1
    d
    g
    • 3
    • 2
  • a

    addamsson

    11/11/2018, 12:19 AM
    is most of the code in a common module?
    n
    • 2
    • 3
  • d

    Dashishmakov

    11/13/2018, 8:37 AM
    It means the
    @Id
    should be
    var
    and nullable type? I should every time write
    val id = entity.id!!
    in this case. I hope JBoss team will do improvement for Kotlin in the future (for Hibernate).
    m
    • 2
    • 3
  • s

    Shawn

    11/13/2018, 3:34 PM
    check out
    jdbi3-kotlin
    and
    jdbi3-kotlin-sqlobject
    if you aren’t deathly afraid of writing a bit of SQL
    c
    f
    m
    • 4
    • 13
  • o

    orangy

    11/14/2018, 12:37 PM
    📣 If you need arguments to try #ktor, here is one: https://www.thoughtworks.com/radar/languages-and-frameworks
    👌 4
    👍 10
    p
    d
    n
    • 4
    • 12
  • b

    bdawg.io

    11/16/2018, 10:54 PM
    Has anyone found an existing GraphQL library that utilizes coroutines?
    👍 3
    m
    b
    s
    • 4
    • 7
  • h

    hdarritchon

    11/19/2018, 1:41 PM
    Hi everybody, I have a project based on #ktor v1.0.0-beta-4. It’s an API, exposing a big catalog (35 Mo). I am planning to bring this catalog into pieces later on but right now, it goes to production as this, in the form of a big String. I have some memory performance issues and I try to fix those issues. My App has the same configuration than during the Dev. I am looking for a way to have 2 separate configuration, one for dev and one for prod. I have read the documentation (https://ktor.io/servers/configuration/environments.html) but I can’t find a way to disable the autoreload conf I have set up in my app for dev purpose. Do you know how to do it ?
    m
    • 2
    • 11
  • t

    Tim Büthe

    11/20/2018, 8:42 AM
    Hey folks, I’m working on a Ktor application that acts like a gateway between our app and the backend. Its only purpose is to combine multiple http requests into one for the app. In general communication between backend services is wrapped in Hystrix commands. I’m now wondering if this is also feasable for my Ktor service. The call to the other services should happen in parallel and I wanted to leverage coroutines for that, but when I now use Hystrix inside a Coroutine I end up starting a thread again, right? Do I have to use something like the Ktor client, which implements suspending functions around the http requests, or would it be fine (aka performant) to use Hystrix and just start a thread? Or is there maybe even a Hystrix alternative I could use in this particular case?
    l
    • 2
    • 2
  • m

    martinh

    11/21/2018, 8:43 PM
    Hey guys. Would anyone here be interested in trading React mentoring for Kontlin mentoring? I’m looking to get up to speed on building full fledged API’s with Kotlin, preferably Ktor.
    e
    e
    • 3
    • 3
  • s

    Slackbot

    11/22/2018, 11:16 PM
    This message was deleted.
    🚓 2
    e
    m
    • 3
    • 2
  • m

    mp

    11/26/2018, 1:10 PM
    define "rewrite"... redirect? alter the Host header? have vhosts for both domains?
    j
    • 2
    • 6
Powered by Linen
Title
m

mp

11/26/2018, 1:10 PM
define "rewrite"... redirect? alter the Host header? have vhosts for both domains?
j

Jared

11/26/2018, 1:24 PM
I am probably wanting to redirect site.com to www.site.com or site.com/page to www.site.com/page
m

mp

11/26/2018, 1:37 PM
If your load balancing layer allows you to define that (e.g. nginx) I'd do it there. Otherwise, add a jetty handler for that vhost that unconditionally redirects.
☝️ 2
Adding that sort of logic to your application itself is doable, but a bit messy. Ideally such things would be orthogonal to your app logic.
Jetty Handlers: https://www.eclipse.org/jetty/documentation/9.4.14.v20181114/embedding-jetty.html#_using_handlers
(assuming ktor's jetty integration gives you access to the underlying jetty engine...)
j

Jared

11/26/2018, 3:40 PM
Thanks. I am running my app in azure's web app for containers so I don't manage the load balancing. So I think I will need to take a look at implementing a Jetty handler
View count: 1