Hey y'all, just wanted to pop in and say that I'm enjoying the experience with Http4k so far! I've created a small tabletop service connected to a MongoDB and running and testing it has been pretty sane so far, great work! 🙂
soulbeaver
04/07/2019, 6:03 PM
Oh yeah, more comprehensive docs would be lovely! I hadn't used this type of framework before (Sinatra inspired with its routing and whatnot?) and figuring out how to create a project with routes organized into different classes wasn't that easy
That’s good feedback: we could look into adding more implementation patterns.
At a high level, I suggest using handlers mainly to do “http-domain” translations. Most of the time it should be just a few lines of code (specially if you’re using lens), and I just define it as a single class if I want to test it individually. That’s not often though, as it’s usually as easy to test against the collection of app routes
s
soulbeaver
04/07/2019, 6:23 PM
Interesting, thanks for the response! I'll try and refactor the app with that insight in mind and see how it feels 🙂