This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-15
Channels
- # announcements (71)
- # architecture (2)
- # aws (41)
- # babashka (23)
- # beginners (80)
- # calva (26)
- # chlorine-clover (11)
- # cljfx (4)
- # cljs-dev (12)
- # clojure (78)
- # clojure-berlin (5)
- # clojure-czech (3)
- # clojure-dev (9)
- # clojure-europe (45)
- # clojure-france (16)
- # clojure-gamedev (2)
- # clojure-italy (3)
- # clojure-nl (4)
- # clojure-spec (8)
- # clojure-sweden (1)
- # clojure-uk (37)
- # clojurescript (18)
- # community-development (15)
- # conjure (30)
- # cursive (51)
- # datomic (16)
- # duct (19)
- # figwheel-main (3)
- # fulcro (23)
- # java (7)
- # jobs (2)
- # joker (10)
- # off-topic (7)
- # parinfer (1)
- # pathom (6)
- # reagent (5)
- # reitit (1)
- # remote-jobs (1)
- # sci (1)
- # shadow-cljs (55)
- # slack-help (3)
- # specter (4)
- # sql (21)
- # tools-deps (11)
- # vim (5)
- # xtdb (14)
Is there some convention for replacing a single value in an existing config key? I am running into an issue with duct/module.sql and not being able to specify the maximum pool size. I thought I might be able to do something to the :duct.database.sql/hikaricp
key that is included via the module, but it seems to just over write it.
Haven't used module.sql
, but the configs should get merged during prep, no? From my understanding of the docs I would try {:duct.database.sql/hikaricp {:maximum-pool-size 5}}
That is what I tried, and it seemed to replace the config completely. I was able to solve this by creating a module that extends the sql module with this value
(ns duct.module.pool-size
(:require [integrant.core :as ig]))
(derive ::hikaricp :duct/module)
(defmethod ig/init-key ::hikaricp [_ {:keys [maximum-pool-size]}]
(fn [config]
(assoc-in config [:duct.database.sql/hikaricp :maximum-pool-size] maximum-pool-size)))
(defmethod ig/prep-key ::hikaricp [_ options]
(assoc options ::requires (ig/ref :duct.module/sql)))
Hey! I am trying to get buddy auth to work with Duct, but have trouble understanding how to make it work. I am looking at this issue: https://github.com/duct-framework/module.ataraxy/issues/4, but canβt grok what weavejester is suggesting. What would a complete config look like if you follow what he is saying?
Your config should have a key for :duct.middleware.buddy/authorization
. There may be multiple ways to do this, but I have been configuring these at the router and root handler
For example, my router config looks like this:
;; Routes
:duct.router/ataraxy
{:routes
{[:post "/login"] [:web.handler/login]
[:post "/authorize"] [:web.handler/authorize]
[:post "/slash"] ^:slack [:web.handler/slash]
[:post "/action"] ^:slack [:web.handler/action]
[:post "/message"] ^:protected [:web.handler/message]
[:get "/info"] [:web.handler/info]}
:middleware {:slack #ig/ref :web.middleware/slack
:protected #ig/ref :web.middleware/protected}}