Hello guys, im playing with your example projects....
# kvision
w
Hello guys, im playing with your example projects. First of all, thank you for the number of examples and the documentation. I’m afraid I’m missing something. In a fullstack app like “twees-fullstak-ktor”, the backend delivers the static frontend part (html+js) right? When I start “backendRun”, where can I reach the html endpoint?
r
No. You can't.
backendRun
task in all example apps is configured for development, and doesn't publish static html/js resources at all. You should run
frontendRun
task from the second terminal/console window to have them published by webpack dev server (on port 3000). This way you have all the features of webpack, including hot reload. Backend task just publishes api endpoints on port 8080 (byt they are proxied by webpack, so are also available on port 3000).
w
Thanks, so I have to deploy them as two seperate units in production? Thought kotlin multiplattform would do it as one unit.
r
No.
It's configured so just for development.
This way you can use hot reload independently for frontend and backend.
For production you use
jar
gradle task
It packs all required resources, both frontend and backend into a single fat jar.
And you can just deploy this jar to your production hosting.
w
Ah thats cool and working 😄
r