This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-18
Channels
- # announcements (43)
- # aws (28)
- # babashka (32)
- # beginners (80)
- # calva (13)
- # chlorine-clover (2)
- # cider (11)
- # clj-kondo (15)
- # cljs-dev (1)
- # clojure (151)
- # clojure-dev (11)
- # clojure-europe (11)
- # clojure-italy (3)
- # clojure-losangeles (3)
- # clojure-nl (4)
- # clojure-spec (20)
- # clojure-uk (58)
- # clojured (3)
- # clojuredesign-podcast (2)
- # clojurescript (37)
- # core-async (4)
- # core-typed (1)
- # cursive (53)
- # datascript (5)
- # datomic (26)
- # duct (23)
- # emacs (3)
- # fulcro (22)
- # graalvm (1)
- # jobs (2)
- # joker (11)
- # juxt (24)
- # lumo (1)
- # mid-cities-meetup (2)
- # nyc (1)
- # off-topic (54)
- # parinfer (1)
- # reagent (13)
- # shadow-cljs (16)
- # sql (9)
- # tree-sitter (9)
- # vim (9)
See if you're able to control the arguments passed to :duct.server.http/jetty
https://github.com/duct-framework/server.http.jetty
thanks @U3X7174KS
I’ve tried :duct.server.http/jetty {:port 8888}
but I get an error message Execution error (AssertionError) at integrant.core/prep (core.cljc:399). Assert failed: (map? config)
Are you sure your system map is well formed? Are you able to able to work with it as a data structure within your normal Clojure code?
I suspect you might see something like that if you're missing some parens or have gotten an odd number of entries in your map.
I’ve just tried to parse directly the config.edn
file with clojure.edn/read-string
and it can read it properly.
I guess you'd need a handler for any of this to make sense. I still find the Assert failed: (map? config)
a bit surprising.
By default the config for :duct.server.http/jetty
has this structure {:port 3000, :handler {:duct.handler/root}, :logger {:key :duct/logger}}
thanks @U3X7174KS I’ll try to play a bit more passing a :handler
and a :logger
I'm by no means a Duct expert myself, but I remember that I had to fiddle a lot with the meaning of all the data stuff before I started to understand how it all fit together. A few more things clicked for me when I worked through this tutorial: https://circleci.com/blog/build-a-clojure-web-app-using-duct/
I think you might be defining :duct.server.http/jetty {:port 8888}
outside of :duct.profile/base
. It should be inside.
That error happens when you add a regular integrant handler to the "module" space (module space being outside of the base config map)
Good to hear, I made a PR to return a better error message when this happens https://github.com/duct-framework/core/pull/32
@UG9U7TPDZ Thanks for creating the PR! I remember having banged my head against the same problem.