This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-23
Channels
- # announcements (3)
- # babashka (68)
- # beginners (297)
- # calva (13)
- # cider (4)
- # clj-kondo (8)
- # cljs-dev (10)
- # cljsrn (26)
- # clojure (100)
- # clojure-europe (4)
- # clojure-germany (1)
- # clojure-italy (9)
- # clojure-nl (5)
- # clojure-spec (9)
- # clojure-uk (41)
- # clojurescript (69)
- # conjure (70)
- # cursive (44)
- # data-science (20)
- # datascript (2)
- # datomic (55)
- # emacs (1)
- # exercism (3)
- # graalvm (2)
- # kaocha (11)
- # leiningen (6)
- # meander (9)
- # mental-health (1)
- # off-topic (73)
- # pathom (6)
- # pedestal (1)
- # re-frame (3)
- # reagent (52)
- # reitit (8)
- # rum (39)
- # shadow-cljs (152)
- # spacemacs (10)
- # tools-deps (28)
- # xtdb (5)
@johan178 maybe here? https://github.com/metosin/reitit/blob/master/modules/reitit-interceptors/src/reitit/http/interceptors/multipart.clj
@alishermatkurbanov040 you can use it in either or both. you can also share the routing tables in cljc
if that is useful.
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.
Hi all. Do you write functional tests for your reitit back-end apps?
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 …})
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.