Hey so tried to follow most of the multi-platform ...
# multiplatform
c
Hey so tried to follow most of the multi-platform instructions (https://play.kotlinlang.org/hands-on/Full Stack Web App with Kotlin Multiplatform) and I was able get my app working locally.. The problem that I am seeming to have is that my index.html uses a line
Copy code
<script src="myJS.js"></script>
but when my frontend tries to request that JS file from my Ktor server it response with 404 .. (the request made is http//hostport/myJs.js)I followed the steps to copy myJr.js into my jar file but still seems like the file can't be found.. Also to be clear when I run jsBrowser[Development/Production]Run everything works correctly. But that is likely because webpack dev server is serving js file Also I would like to mention that when I manually create an endpoint get("/myJs.js") and return static resource myJs.js all seems to work as expected not sure what I am missing .. any help or suggestions would be appreciated
Well all seems to be working the only thing that I did add was
Copy code
tasks.named<Copy>("jvmProcessResources") {
    val jsBrowserDistribution = tasks.named("jsBrowserDistribution")
    from(jsBrowserDistribution)
}
I am not sure why my copying myJs.js to the jar didn't allow this resource to be accessible .. I will look into later
well here are things that I needed to change to get it working • Changed ktor version 1.6.5 -> 1.6.7 • used PORT environment variable • I also served index.html and my static .js files.. not sure why putting it in jar didn't work as instructions stated.