This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-10
Channels
- # aleph (1)
- # beginners (4)
- # biff (7)
- # calva (7)
- # cider (8)
- # clara (17)
- # clerk (19)
- # clj-kondo (30)
- # clojure (12)
- # clojure-austin (1)
- # clojure-europe (12)
- # clojure-losangeles (1)
- # clojure-norway (21)
- # clojurescript (2)
- # datalevin (1)
- # datomic (24)
- # duct (3)
- # fulcro (8)
- # hyperfiddle (8)
- # lambdaisland (4)
- # membrane (6)
- # missionary (7)
- # off-topic (55)
- # overtone (2)
- # reagent (4)
- # reitit (4)
- # releases (6)
- # shadow-cljs (80)
Hi! I am very interested in using duct for a commercial application server. I think I need to write a module for my db replacement, but I am stumped as to how to proceed. I have this module implementation:
(ns com.yardwerkz.module.rama
(:require
[integrant.core :as ig]
[duct.core :as duct]))
(defmethod ig/init-key :com.yardwerkz.module/rama [_ options]
(fn [config]
(duct/merge-configs
config
{:com.yardwerkz.module.rama/external-name "localhost"
:com.yardwerkz.module.rama/serializations
[com.yardwerkz.serialization.YardwerkzSerialization
com.yardwerkz.serialization.YardwerkzTEnumSerialization]})))
and this config:
{:duct.profile/base
{:duct.core/project-ns com.yardwerkz
:duct.router/ataraxy
{:routes {[:get "/"] [:com.yardwerkz.handler/index]}}
[:duct.handler.static/ok :com.yardwerkz.handler/index]
{:body {:entries "/entries"}}
:duct.handler.static/not-found
{:body "I can't find what you want!"}
:duct.server.http/http-kit
{:port 3000}}
:duct.profile/dev #duct/include "dev"
:duct.profile/local #duct/include "local"
:duct.profile/prod {}
:duct.module/logging {}
:duct.module.web/api {}
:com.yardwerkz.module/rama {}}
and I am getting this error:
Execution error (IllegalArgumentException) at integrant.core/resume$fn (core.cljc:450).
No method in multimethod 'init-key' for dispatch value: :com.yardwerkz.module.rama/external-name
Thanks in advance for any help you can offer.