So what do y’all think about this for all the code you need for a basic POST/redirect/GET guestbook web app with Kitten?
Does it all make sense?
https://codeberg.org/kitten/app/src/branch/development-mode/examples/guestbook
Basically, you run kitten on that directory and hit https://localhost.
(Note: Kitten is not ready for use yet. I think the core design is solid now though. You can play with it but I’m only starting to work on the developer experience now. Should be far nicer in the next few weeks.)
@aral looks nice. i'm just confused where the tagged template literal definitions come from, (not a fan implicit globals).
also it looks scary that there is no html escaping of user input, but i guess that's handled by the html template func? in that case it would be good to have that pointed out
@norwin Thanks. And yes, html (like db) is a global. Kitten favours ease of use so it does have a handful of commonly-used globals.
The html template function does handle escaping (there’s a raw() function you can call to pass unescaped content) and yes, that should be documented, thank you. I’ll open an issue for that now :)
@norwin PS. Done, tracking here: https://codeberg.org/kitten/app/issues/24