44 ms·
I feel the same way. I hadn't heard of Liberator, though. We're using Reitit for routing both in backend and frontend and middleware for content negotiation and
by dancek 8y ago
I feel the same way. I hadn't heard of Liberator, though. We're using Reitit for routing both in backend and frontend and middleware for content negotiation and such. It's an awesome setup (though there were some rough edges starting out), almost everything is easy to understand just by reading the source.
Just today I was thinking how nice it is to have the backend route tree available in both backend and frontend code, so e.g. it's easy to tell in advance in cljs whether the user has permission to use a specific endpoint. The route tree includes authorized roles and I wrote a simple auth middleware to enforce them.