Some thoughts after my first kobweb cloud-deploy (...
# kobweb
j
Some thoughts after my first kobweb cloud-deploy (πŸŽ‰ πŸŽ‰), in 🧡
K 4
πŸŽ‰ 2
1. First and foremost, Kobweb is amazing. As someone coming from Android,
Column
/
Row
/
Box
have saved me so much time it isn't even funny. Do you have a patreon or github sponsor or anything set up? I'd love to buy you some coffee/beer πŸ˜„ 2. This article was super helpful, very much appreciated 3. For a while my websockets were refusing to connect. (I eventually realized it was because I had accidentally undone the CORS change in my .yaml). I don't know if there's any way to get a more detailed error message than "failed to connect", but that would have been useful. 4. "Static site export" is a very cool feature. However, my particular use case is internal-only, so I don't care about SEO. Is there a way to opt out of it? I'd rather reduce the build time/complexity (e.g. not have to install playwright). Not super important, just curious 5. If your server crashes on startup (in my case due to an env variable that was missing but only in Docker),
kobweb export
will (understandably) not be able to export your static .htmls. However, it will also complete successfully, which means instead of an error you get what looks like a green build, but that says "error, no /site/ found" when you try to run it. Even worse is that unless you specify otherwise, Docker only shows you the last few lines of output when building, so you'll never see the error. Happy to file a github issue or provide a repro, tell me what's useful.
πŸ‘ 1
d
Congratulations and thanks for the feedback!
For 5, does the output not day that some of the pages crashed?
I should look into a better experience there.
./gradlew kobwebExport is kind of a black box to the CLI. Maybe I can improve that.
For 3 CORS is a huuuuge pain to debug. Maybe I need to document that better. Best I found was console dev tools and server logging. I'll take a note to check the docs and improve them.
j
For #5, the output looks like
Copy code
blablah
BUILD FAILED (because your server crashed)
blahblah, trying to export, but can't
BUILD SUCCEEDED (from the overall kobweb export)
with exit code 0
d
And for 1, thank you so much for the offer! At the moment I'm trying to avoid weird incentives with Kobweb so I'm happy to keep it totally free. The best way the community can help is by using it and enjoying it! showing off projects if possible, sharing testimonials, and/or just talking to others about it is helpful too.
πŸ‘ 1
j
so if the output is truncated (e.g. while building a docker image) you don't know that it failed
d
Gotcha
j
Sounds good!
d
Excited to hear someone is using web sockets! You're using API streams, yeah?
j
Yep!
Working great πŸ™‚
πŸ™Œ 1
d
BTW, I just tested using this:
Copy code
kobweb {
    app {
        export {
            // We don't care about SEO for this site, no export snapshots needed!
            filter.set { false } 
        }
    }
}
and it worked. The export process gives you a warning but you can ignore it because you're doing it intentionally here.
πŸ‘Œ 1