https://kotlinlang.org logo
#kotless
Title
# kotless
g

Gary

02/11/2021, 5:38 AM
Hi I just deployed the spring example url shortener @TanVD - but the CSS and JS are 404'ing The lambda is deployed at: https://x.amazonaws.com/STAGE The html/js looks for it at the root i.e. https://x.amazonaws.com/css/shortener.css But the actual API Gateway mappings are at: https://x.amazonaws.com/STAGE/css/shortener.css The only thing I removed is this
Copy code
webapp {
        route53 = Route53("spring.short", "<http://kotless.io|kotless.io>")
    }
Wondering if this is expected behaviour or am I doing something wrong? Or is the sample broken? It works fine locally.
t

TanVD

02/11/2021, 8:22 PM
It is expected behavior, by default AWS would place your app to
/STAGE/
path. In Kotless DSL I am fixing it via some magic, in other DSLs I cannot fix it 😞
g

Gary

02/11/2021, 9:30 PM
Can you point me at the code that fixes it via kotless DSL?
@TanVD ☝️
Right now I’m replacing this line with hardcoding of https://github.com/JetBrains/kotless/blob/master/examples/spring/shortener/src/main/kotlin/io/kotless/examples/page/Root.kt#L31 to
/STAGE/css/shortener.css
This hardly seems ideal
3 Views