duct

jeremy 2019-07-11T07:05:56.061300Z

Hi there, apart from @y.khmelevskii has anyone tried to hook up Reitit to Duct?

y.khmelevskii 2019-07-12T11:09:07.063100Z

@clodeindustrie249 just curious, why my example didn’t match you?

jeremy 2019-07-12T11:23:17.063300Z

As far as I understand you’re using pedestal and bypassing duct/module.web

jeremy 2019-07-12T11:24:02.063500Z

I don’t want pedestal and initially I wanted to use duct/module.web with Reitit as the router

jeremy 2019-07-12T11:26:30.063700Z

I’m a bit confused but I think that Reitit wouldn’t work with module.web and I might need to make my own

2019-07-13T23:36:11.064100Z

@clodeindustrie249 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 perspective

jeremy 2019-07-15T07:25:34.079200Z

awesome! worked perfectly thanks @grzegorzrynkowski_clo I'm just starting with Clojure and Duct so that didn't occur to me to do that, but it's makes perfect sense

2019-07-15T11:55:53.079400Z

I’m glad I could help 🙂

romain 2019-07-20T13:58:57.000200Z

Hey, I just found another example if you want to study duct with reitit and other cool things: https://github.com/dimovich/roll

jeremy 2019-07-11T07:06:55.062200Z

I have tried a few things, but I am getting a bit confused as to what I am supposed to be able to set :duct/router to, in my config.edn

jeremy 2019-07-11T21:23:04.063Z

looks like I won't be able to hook it up just like that, I will have to create a module for it