Luminus- accessing data from a REST API route in a selmer template

148 views Asked by At

I would like to make a Luminus app that provides a REST API and serves data from that API in Selmer templates. However, I can't figure out how to get the routing to work.

For example, if you create a luminus template using the command lein new luminus consume_rest +reitit +swagger, you'll get selmer templates under home-routes and the REST API under service-routes. I would like to include data provided by endpoints under service routes within the templates in home-routes.

Does anyone have a suggested way on how to architect this, or an example of an application that does so? Every project I`ve seen with a REST API is a SPA using clojurescript, which call the REST API with AJAX.

0

There are 0 answers