Fork me on GitHub
#luminus
<
2021-02-21
>
Todd01:02:33

So I’m trying to use luminus for REST services called by some internal JS eventually ClojureScript. The routes were much easier for REST with just compojure IMO but I wanted to use a full blown web framework. What should I be doing for my REST routes?

tobias12:02:11

I use the +swagger https://luminusweb.com/docs/profiles.html for the Luminus lein template and then adapt the examples in the generated boilerplate. If you use that profile and look in routes/services.clj you can see a /math/plus example route that reads x and y values from query parameters in a GET request.

tobias12:02:36

Using swagger is pretty nice because you get a web interface for all your REST endpoints so you can try them out even if you haven't coded the front end yet.

Todd01:02:14

Just need to see how to get a hold of path parameters and request parameters and documentation has very little