This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-11
Channels
- # announcements (1)
- # aws (3)
- # beginners (48)
- # calva (2)
- # cider (47)
- # clj-kondo (1)
- # cljs-dev (23)
- # cljsrn (10)
- # clojure (81)
- # clojure-chicago (4)
- # clojure-europe (3)
- # clojure-greece (4)
- # clojure-italy (8)
- # clojure-losangeles (1)
- # clojure-nl (6)
- # clojure-sanfrancisco (1)
- # clojure-seattle (1)
- # clojure-uk (21)
- # clojurescript (40)
- # core-async (82)
- # cursive (18)
- # datomic (6)
- # duct (11)
- # figwheel-main (4)
- # fulcro (26)
- # jobs-discuss (22)
- # leiningen (18)
- # off-topic (10)
- # pathom (3)
- # re-frame (5)
- # reagent (16)
- # reitit (4)
- # shadow-cljs (8)
- # specter (7)
- # sql (16)
- # tools-deps (58)
- # xtdb (30)
Hi there, apart from @y.khmelevskii has anyone tried to hook up Reitit to Duct?
@ULB5985EC just curious, why my example didn’t match you?
I don’t want pedestal and initially I wanted to use duct/module.web
with Reitit as the router
I’m a bit confused but I think that Reitit wouldn’t work with module.web
and I might need to make my own
@ULB5985EC I use reitit with duct and its jetty server provided by module.web
.
If you are using module.web
I don’t think you need to use module.web
, beside the jetty server. What I do is:
- taking module.web
as a project dependency
- manually declaring :duct.server.http/jetty
(when you use module.web
it is added out-of-the-box)
- creating a :duct/handler
from reitit.ring/ring-handler
- connecting the above handler to aforementioned jetty component
Code snippet from my :duct.profile/base
:
:infrastructure.router/root-handler
{:routes-api #ig/refset :infrastructure.router/api-route
:routes-website #ig/refset :infrastructure.router/website-route}
:duct.server.http/jetty {:port 3000,
:handler #ig/ref :infrastructure.router/root-handler,
:logger #ig/ref :duct/logger}}
I can share some repo if you needed a broader perspectiveawesome! worked perfectly thanks @UBVL1LR5F I'm just starting with Clojure and Duct so that didn't occur to me to do that, but it's makes perfect sense
I’m glad I could help 🙂
Hey, I just found another example if you want to study duct with reitit and other cool things: https://github.com/dimovich/roll