Fork me on GitHub
#reitit
<
2020-04-23
>
Johan01:04:45

Does the repo include a spec for file param when using http-malli ?

ikitommi04:04:39

@alishermatkurbanov040 you can use it in either or both. you can also share the routing tables in cljc if that is useful.

đź‘Ť 4
ikitommi04:04:34

I could try to polish out & push out code for a simple cqrs-style dispatcher that we have used for with clj+cljs apps - describe the actions as data and generate http and ws endpoints (at runtime) out of those. now that we can serialize the data models too with #malli, one can ship a lot of information from the backend to the frontend at runtime, enabling truly dynamic systems, and also without much code.

konrad szydlo11:04:40

Hi all. Do you write functional tests for your reitit back-end apps?

jtth15:04:19

Luminus uses reitit as the router, managed by mount. (see here under “organizing application routes”.) maybe this is because i don’t quite understand mount, but how would I go about simulating requests to the app like in the reitit documentation, where I’d do something like (app {:request-type :get …})

bartuka15:04:54

Hi @jtth, the mount usually handles the runtime of the app, therefore the definition of the app as in the docs still need to happen somewhere in the luminus code-base.

(defstate webserver
  :start (http/run-server #'app {:port 4000})
  :stop (webserver :timeout 100))
I dont know the codebase there, but something like this may be happening. You need to use this same app that mount is using to start the server.

bartuka15:04:45

I don't remember if you even need to have the server running to do that.