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
kotless
  • s

    sikri

    08/30/2020, 7:05 PM
    is it compatible with kotlin 1.4.0? (v 0.1.6)
    kotlin("jvm") version "1.4.0"
    +
    ./gradlew generate
    results in
    Caused by: java.lang.NoSuchMethodError: org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(Lorg/jetbrains/kotlin/com/intellij/openapi/project/Project;Ljava/util/Collection;Lorg/jetbrains/kotlin/resolve/BindingTrace;Lorg/jetbrains/kotlin/config/CompilerConfiguration;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Lorg/jetbrains/kotlin/com/intellij/psi/search/GlobalSearchScope;ILjava/lang/Object;)Lorg/jetbrains/kotlin/analyzer/AnalysisResult;
    	at io.kotless.parser.utils.psi.analysis.ResolveUtil.analyze(ResolveUtil.kt:26)
    	at io.kotless.parser.utils.psi.analysis.ResolveUtil.analyze$default(ResolveUtil.kt:25)
    	at io.kotless.parser.utils.psi.analysis.ResolveUtil.analyze(ResolveUtil.kt:21)
    	at io.kotless.parser.utils.psi.analysis.ResolveUtil.analyze(ResolveUtil.kt:17)
    	at io.kotless.parser.Parser.parse(Parser.kt:33)
    	at io.kotless.plugin.gradle.tasks.gen.KotlessGenerateTask.parseSources(KotlessGenerateTask.kt:92)
    	at io.kotless.plugin.gradle.tasks.gen.KotlessGenerateTask.act(KotlessGenerateTask.kt:71)
    t
    a
    • 3
    • 5
  • m

    Moroa Matshubeni

    08/31/2020, 1:03 PM
    👋 Everyone, I'm experiencing the following error when deploying with route53 set,
    Error: No certificate for domain "<http://test.example.co.za|test.example.co.za>" found in this region
    a certificate has been isssued to example.co.za. Another issue is how do i override the function name, at the moment
    function_name = "merged-0"
    t
    • 2
    • 4
  • s

    Sebastian Kazenbroot-Guppy

    09/08/2020, 10:25 PM
    Hi all! I deployed a Ktor Kotless app, exposing an endpoint at
    <https://api.sebastiankazenbrootguppy.com/topics|https://api.sebastiankazenbrootguppy.com/topics>
    . This endpoint returns application/json. When visiting this endpoint in Chrome, I see
    HTTP ERROR 406
    (you likely do too). However, when I CURL the endpoint, or use the API Gateway test UI, it returns an array of five JSON entities like it's supposed to. Has anyone else encountered HTTP 406 issues with a Ktor Kotless app?
    👀 2
    d
    t
    • 3
    • 4
  • a

    aarjav

    09/16/2020, 12:26 AM
    I'm trying to make a simple-ish website where forms can be submitted publicly, and an admin user can view / search / and do basic crud operations on them. I want to allow users to upload files like images and serve them up as well. I plan to use s3 for static content serving and user uploads, and dynamodb for storing forms / users. I have never deployed anything to aws before or made use of s3 / dynamodb. Do I need to learn terraform to make use of s3 and dynamodb with kotless? Are there any examples projects I can use as a reference? (saw nookbot above)
    t
    m
    • 3
    • 7
  • m

    Mattlangsenkamp

    10/05/2020, 12:38 AM
    I am trying to give my kotless application access to secrets manager in the same way I do with dynamo as such:
    @DynamoDBTable(tableName, PermissionLevel.ReadWrite)
    however there does not appear to be a annotation for secrets manager in the io.kotless.dsl.lang namespace. Is there a way around this?
    t
    • 2
    • 4
  • a

    AnnoymousGiraf

    10/06/2020, 5:04 AM
    Hi All, any news on the issue https://kotless.sandbox.intellij.net/introduction that you cant deploy outside US-EAST-1 region ?
    t
    • 2
    • 2
  • m

    Mattlangsenkamp

    10/06/2020, 9:01 PM
    Has anyone ever experienced errors that do not occur locally but do occur once deployed? I get this error when trying to run a the sign in mutation, and I don not get this error locally. Cloudfront logging indicated signin succedded but then this error occured when the data was beingreturned. https://github.com/MattLangsenkamp/fnb-serverless-2/blob/picture-upload/src/main/kotlin/fnb/graphql/AuthSchema.kt
    java.lang.IllegalArgumentException: List has more than one element.
    	at kotlin.collections.CollectionsKt___CollectionsKt.single(_Collections.kt:550)
    	at io.kotless.dsl.ktor.app.KotlessResponse.toHttp(KotlessResponse.kt:73)
    	at io.kotless.dsl.ktor.Kotless$handleRequest$response$1.invokeSuspend(Kotless.kt:80)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    	at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(PipelineContext.kt:238)
    	at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:194)
    	at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(PipelineContext.kt:67)
    	at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(PipelineContext.kt:144)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    	at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(PipelineContext.kt:238)
    	at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:194)
    	at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(PipelineContext.kt:67)
    	at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(PipelineContext.kt:144)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    	at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(PipelineContext.kt:238)
    	at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:194)
    	at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(PipelineContext.kt:67)
    	at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(PipelineContext.kt:144)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    	at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(PipelineContext.kt:238)
    	at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:194)
    	at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(PipelineContext.kt:67)
    	at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(PipelineContext.kt:144)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    	at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(PipelineContext.kt:238)
    	at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:194)
    	at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(PipelineContext.kt:67)
    	at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(PipelineContext.kt:144)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    	at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:32)
    	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:113)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    	at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:32)
    	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:113)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    	at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:32)
    	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:113)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
    	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:272)
    	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:79)
    	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:54)
    	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
    	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:36)
    	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
    	at io.kotless.dsl.ktor.Kotless.handleRequest(Kotless.kt:54)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at lambdainternal.EventHandlerLoader$StreamMethodRequestHandler.handleRequest(EventHandlerLoader.java:356)
    	at lambdainternal.EventHandlerLoader$2.call(EventHandlerLoader.java:902)
    	at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:341)
    	at lambdainternal.AWSLambda.<clinit>(AWSLambda.java:63)
    	at java.lang.Class.forName0(Native Method)
    	at java.lang.Class.forName(Class.java:348)
    	at lambdainternal.LambdaRTEntry.main(LambdaRTEntry.java:150)
    t
    • 2
    • 1
  • m

    Mattlangsenkamp

    10/07/2020, 3:07 PM
    Sorry to clog this chat but here i am again. I am using ktor with kgraphql. Before I was just executing the schema from inside a /graphql post route, which made it possible for kotless to deploy the lambda. I just switched over to using the kgraphql plugin (https://kgraphql.io/Plugins/ktor/) to gain access to the graphql playground for testing. The code works well when run locally however now cus there is no actually defined route kotless cannot seem to correctly configure api gateway. The route is still a POST method at /graphql, that information is just obscured now. Is there a way for me to manually define how api gateway should be created or to otherwise work around this? Below is the error I get as well as the branch im working on:
    t
    • 2
    • 11
  • l

    LeoColman

    10/08/2020, 1:02 AM
    Hey guys! How are you testing the Kotless endpoints? How do I start the local server in an unit test (is that even possible?)
    t
    • 2
    • 2
  • a

    AnnoymousGiraf

    10/09/2020, 2:03 AM
    Hey all is there anyway i can specify a specific iam role with the config?
    t
    • 2
    • 6
  • t

    TanVD

    10/11/2020, 3:25 PM
    Kotless version
    0.1.7-beta-4
    was released. It is a beta version with an experimental support of GraalVM. You can start using GraalVM in your Ktor projects just by specifying
    runtime = Runtime.GraalVM
    . Kotless will do everything for you -- compile application, add custom runtime and so on. See more about it at https://github.com/JetBrains/kotless#beta-release GraalVM reduces cold-start time by 200-400x, for example initialization of Ktor Site application now takes about 3ms. Basically, in a lot of cases GraalVM fully solves the problem of cold-starts
    💯 1
    🎉 5
    m
    • 2
    • 2
  • p

    PJ Walstrom

    10/15/2020, 8:01 PM
    Trying to configure Route53 with the following:
    route53 = Route53(alias="", zone="<http://mydoama.org|mydoama.org>", certificate="_<http://e491cf4eb0d63b4d22903af02782d761.mydoama.org|e491cf4eb0d63b4d22903af02782d761.mydoama.org>")
    but get the following error:
    Error: No certificate for domain "<http://_e491cf4eb0d63b4d22903af02782d761.mydoama.org|_e491cf4eb0d63b4d22903af02782d761.mydoama.org>" found in this region
      on <http://kotless-test.tf|kotless-test.tf> line 141, in data "aws_acm_certificate" "e491cf4eb0d63b4d22903af02782d761_mydoama_org":
     141: data "aws_acm_certificate" "e491cf4eb0d63b4d22903af02782d761_mydoama_org" {
    I have set up a certificate for us-east-1 (N. Virginia), so I just don't know what is wrong. I am a bit confused what the parameters to Route53 should be. I do not have an alias, and should zone be my domain? Does not sound like a "zone"? Using kotless 0.1.6
    t
    • 2
    • 12
  • d

    dector

    10/17/2020, 12:18 PM
    @TanVD - great talk on Kotlin 1.4 Online Event!
    ➕ 5
    t
    • 2
    • 1
  • p

    PJ Walstrom

    10/18/2020, 8:16 PM
    How do I get static resources to work on AWS? I use
    @StaticGet("/favicon.ico", MimeType.PNG)
    val favicon = File("favicon.ico")
    The resource is deployed to S3, but it is not accessible. Locally, it works, though. I see the same problems with e.g. https://ktor.short.kotless.io/favicon.apng and https://ktor.site.kotless.io/favicon.apng
    t
    • 2
    • 20
  • s

    Sourabh Rawat

    10/20/2020, 1:40 PM
    Where does the logs(printlns) go when you deploy to AWS S3? Does it automatically create log group in AWS Cloudwatch ?
    t
    • 2
    • 8
  • s

    Sourabh Rawat

    10/20/2020, 1:47 PM
    Please help:
    * What went wrong:
    Execution failed for task ':generate'.
    > 'org.jetbrains.kotlin.analyzer.AnalysisResult org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(org.jetbrains.kotlin.com.intellij.openapi.project.Project, java.util.Collection, org.jetbrains.kotlin.resolve.BindingTrace, org.jetbrains.kotlin.config.CompilerConfiguration, kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function2, org.jetbrains.kotlin.com.intellij.psi.search.GlobalSearchScope, int, java.lang.Object)'
    t
    • 2
    • 2
  • s

    Sourabh Rawat

    10/20/2020, 4:36 PM
    Getting:
    Error creating API Gateway Deployment: BadRequestException: The REST API doesn't contain any methods
    
      on <http://whats-your-ip.tf|whats-your-ip.tf> line 14, in resource "aws_api_gateway_deployment" "root":
      14: resource "aws_api_gateway_deployment" "root" {
    please help.
    t
    • 2
    • 23
  • s

    Sourabh Rawat

    10/23/2020, 4:51 PM
    So which version of kotlin-serialization issupported?
    t
    • 2
    • 2
  • a

    aarjav

    10/27/2020, 12:01 AM
    I'm getting unknown mime type error for a pdf file in "static" resources folder. Any way to get around it? I saw this issue https://github.com/JetBrains/kotless/issues/28 but idk if it was resolved and just not closed. (there's a merge?)
    t
    • 2
    • 2
  • d

    dave

    10/27/2020, 8:10 AM
    @TanVD we'd like to add http4k support to Kotless. It should be really simple as is relatively similar to ktor. Is that something that you'd be interested in adding to the library if we PRd it? we'll do all the docs and the examples as well of course. And http4k also supports graalvm out of the box as well so that's a plus.
    👍 2
    t
    • 2
    • 4
  • a

    aleksey.tomin

    11/20/2020, 8:54 AM
    The simplest example (https://hadihariri.com/2020/05/12/from-zero-to-lamda-with-kotless/) has size 12..18mb (kotless/ktor/spring) I try to use ktor (it don’t use reflection). Some from the biggest jars into the zip:
    -rw-r--r--  1 atomin  staff   2.7M Aug 14 10:48 kotlin-reflect-1.3.72.jar
    -rw-r--r--  1 atomin  staff   2.3M Sep 10 11:44 guava-20.0.jar
    -rw-r--r--  1 atomin  staff   1.1M Aug 24 11:19 jackson-databind-2.6.7.3.jar
    -rw-r--r--  1 atomin  staff   756K Aug 24 11:19 httpclient-4.5.9.jar
    -rw-r--r--  1 atomin  staff   718K Oct 13 17:26 javassist-3.21.0-GA.jar
    -rw-r--r--  1 atomin  staff   607K Aug 24 11:19 joda-time-2.8.1.jar
    Why it’s needed?
    d
    t
    • 3
    • 12
  • a

    aleksey.tomin

    11/27/2020, 11:39 AM
    @TanVD Have You got a plan to implement kotless for kotlin-native? JVM not so good for serverless now..
    t
    • 2
    • 4
  • a

    asarazan

    11/28/2020, 8:40 PM
    I’m not sure the right place for this question/request, but I would love to see an example project that includes kotless modules + KMM modules. Would be really nice to be able to have 100% of our codebases in a single project.
    g
    t
    • 3
    • 13
  • a

    asarazan

    12/08/2020, 5:39 PM
    and
    route53 = Route53("www", "<http://example.com|example.com>", "*.<http://example.com|example.com>")
    complains about the * being invalid
    t
    • 2
    • 3
  • a

    asarazan

    12/08/2020, 5:46 PM
    Possibly unrelated after I worked around the ACM Problem:
    t
    • 2
    • 4
  • m

    Mattlangsenkamp

    12/10/2020, 5:37 AM
    Would there be any benefit to using reactive programming techniques with a severless framework? As I understand it lambda will spin up new instances if all existing instances are processing a request. if an already spun up instance was waiting on a db but made good use of reactive/concurrent programming would this instance then appear as "free" to handle a request or would it make no difference to lambda?
    t
    • 2
    • 3
  • a

    Alexandre Brown

    12/12/2020, 2:49 AM
    Hello everyone, is it possible to use Kotlinx.serialization 1.0 + with Kotless? What is the latest version of io.ktor:ktor-serialization that we can use with
    implementation("io.kotless", "ktor-lang", "0.1.7-beta-4")
    Thanks
    t
    • 2
    • 5
  • a

    asarazan

    12/12/2020, 9:53 PM
    Random question: Any idea how far into the distant future websocket support would be for kotless?
    t
    • 2
    • 3
  • a

    Alexandre Brown

    12/12/2020, 10:30 PM
    When I deploy my Kotless app, I notice that I only have 1 function on AWS Lambda "merged-0" with 3 endpoints. Does this mean that these 3 endpoints would have to scale together? Is there a way to have these 3 endpoints as 3 lambda functions? For reference here are the endpoints
    package com.mdServerless.kotless
    
    import io.kotless.dsl.ktor.Kotless
    import io.ktor.application.*
    import io.ktor.response.*
    import io.ktor.routing.*
    import kotlin.random.Random
    
    class Server : Kotless() {
    
        override fun prepare(app: Application) {
    
            app.routing {
    
                get("/") {
                    call.respondText { "Welcome to Kotless" }
                }
    
                get("/hello") {
    
                    val result = compute()
    
                    call.respondText { "Kotless says hello from Ktor! unique value: $result" }
                }
    
                post("/") {
                    call.respondText { "Your post was well received!" }
                }
            }
        }
    
        private fun compute(): Int {
            return Random.nextInt()
        }
    }
    Am I doing something wrong?
    t
    a
    • 3
    • 4
  • s

    Sebastian Kazenbroot-Guppy

    12/13/2020, 6:33 PM
    Hi! I'm serving a static directory from the root (mywebsite.com/thisasset.extension) with 4 files in it: a JavaScript file, a CSS file, an HTML file, and a favicon called "favicon.png". The first three files load just fine when CURL'd/navigated to in a browser, but the favicon returns a 403. Using the API Gateway dashboard "Test" view, the favicon can be retrieved just fine. Is there something that could be different about this PNG?
    t
    • 2
    • 7
Powered by Linen
Title
s

Sebastian Kazenbroot-Guppy

12/13/2020, 6:33 PM
Hi! I'm serving a static directory from the root (mywebsite.com/thisasset.extension) with 4 files in it: a JavaScript file, a CSS file, an HTML file, and a favicon called "favicon.png". The first three files load just fine when CURL'd/navigated to in a browser, but the favicon returns a 403. Using the API Gateway dashboard "Test" view, the favicon can be retrieved just fine. Is there something that could be different about this PNG?
I also notice that the PNG gets an asset/favicon.png route as well as a /favicon.png route, in API Gateway, even though it definitely is not located at asset/favicon.png. This may somehow be an artifact of my build pipeline, I'm not sure 🤔
actually, it seems like the browser gets a 200 but the image is broken?

https://memo.sebastiankazenbrootguppy.com/favicon.png▾

...clearly not broken there? But broken in the browser... there may be something weird about the way its content type is described
t

TanVD

12/13/2020, 11:00 PM
Hm, I am having same problems with favicon on site. Have you checked between different browsers?
s

Sebastian Kazenbroot-Guppy

12/14/2020, 8:27 PM
I just got a moment to test it -- it doesn't work in Edge nor Firefox; and in Firefox it sees the response body as an image/png with 0x0 dimensions, and the page is displayed as "The image "..." cannot be displayed because it contains errors"
Have you gotten working favicons served through kotless previously? Maybe I could follow a certain model
t

TanVD

12/14/2020, 8:48 PM
Yep, it worked few months before :) I’ll check)
View count: 4