(mostly) Static web app #60
-
For a hobby project I have I am adamant about using Kotlin for both FE and BE. I tinkered rather extensively with KVision but since I've settled on a low budget cloud architecture where I would run no servers, one serverless function and both DB and cache as SQLIte files in buckets and pre-render HTML to file extensively I had to look for other alternatives. Also, as a last question, what is the difference between wasmJsMain vs jsMain code targets when using Doodle? Thanks in advance! edit: For example with NextJS you can flip the static switch and through the npx build tools roll a JS/HTML/CSS solution that is self-hosted, static, negates a lot of functionality but to the benefit of not having the NodeJS server. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey, glad you're thinking about using Doodle. You should be able to use it for your use case, assuming you are ok with needing to run JS on the client. Doodle creates SPAs that rely on JS to perform all logic. You will get a JS file when you build a Doodle app. And you usually link to it from some HTML file. But there's no reason you can't also inline the contents of that JS file into the HTML directly. Either way, you won't need a server to interact w/ your app once it is delivered to the client. The difference between wasmJsMain and jsMain is that wasmJsMain is used to build a WebAssembly app. This is still experimental in Kotlin, so I'd recommend sticking with jsMain. Otherwise, the approach to building your app is no different. I hope this helps. Let me know if you have other questions though. |
Beta Was this translation helpful? Give feedback.
Hey, glad you're thinking about using Doodle. You should be able to use it for your use case, assuming you are ok with needing to run JS on the client. Doodle creates SPAs that rely on JS to perform all logic.
You will get a JS file when you build a Doodle app. And you usually link to it from some HTML file. But there's no reason you can't also inline the contents of that JS file into the HTML directly. Either way, you won't need a server to interact w/ your app once it is delivered to the client.
The difference between wasmJsMain and jsMain is that wasmJsMain is used to build a WebAssembly app. This is still experimental in Kotlin, so I'd recommend sticking with jsMain. Otherwise, the ap…