https://kotlinlang.org logo
Title
d

dwellman

10/23/2020, 12:49 PM
This is unrelated to http4k directly, but I’m wondering what folks are using on the front end (assuming a web browser / JavaScript) that talk to their http4k servers? That is, are there any JavaScript libraries that align with some of http4k’s testing and design philosophies? I ask because I am brushing up on my JavaScript and browser knowledge.
r

Riku

10/23/2020, 7:57 PM
I am working on a http4k + Svelte with Typescript app for the second time. Plan to start generating Typescript-fetch code with the openapi generator for this project too. Not sure that Svelte really shares anything design-philsophy-wise with http4k, But with both of them I can get a lot of stuff done with minimal code.
d

dave

10/23/2020, 8:26 PM
@Riku would love to see an example of your stack in GitHub if you have one to hand. Especially interested in the build systems for FE/BE interact . 🙃
r

Razvan

10/23/2020, 8:38 PM
So far, my http4k apps at work just have one or two pages html pages so I went with serverside rendering and as I did't want to learn a template language went with kotlinx-html. But we are about to start a bigger project, I'll try to fight against usually Angular corporate policy to try Svelte or VueJS. What I know so far from those doesn't look to have really in common with http4k philosophies. If you look in something more functional maybe there's something in elm universe but unfortunately didn't found the time so far to look up at that.
d

dave

10/23/2020, 8:43 PM
I think that overall most frameworks will play nicely with http4k. But it's how to run everything in Dev mode seamlessly which am interested in most. The best we've found for react is to run the backend in a process in Idea and have yarn run react in Dev mode to serve the FE (we have the singlePageApp() router for serving these normally)
r

Razvan

10/23/2020, 9:04 PM
Don't know if it can help but in kotlinjs they use Gradle continous build option for that ? https://kotlinlang.org/docs/reference/js-project-setup.html#configuring-run-task
By the way about frontend I saw you changed the toolbox design. It's loolking nicer. A quick remark about the Project Wizard, I guess it's hard (but would be nice) to make it all fit on one page, but can you at least add a back button (the browser one does not work) it painful to restart from the beginning if you want to go back to a selection you made.
d

dave

10/23/2020, 9:31 PM
@Razvan yeah - the reset thing is a bit of a problem. We're aware of it and it's on the list of stuff to fix before we release it more widely. Not sure about going back one step though - we'd need to set up some type of history stack (and my react isn't that good!) 😂. Thanks for the feedback though. 🙃
r

Riku

10/23/2020, 9:36 PM
@dave the ui is developed in isolation, using a dev server, proxying requests, and the production build is now copied over to resources folder. But it will probably be served by Nginx in the final setup; so not really much of interest in terms of a frontend-backend dev build