This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # beginners (10)
- # cider (10)
- # cljs-dev (17)
- # clojure (14)
- # clojure-losangeles (1)
- # clojure-spec (1)
- # clojure-uk (3)
- # clojurescript (49)
- # core-async (5)
- # css (1)
- # datomic (2)
- # duct (26)
- # emacs (13)
- # figwheel (6)
- # figwheel-main (5)
- # garden (1)
- # keechma (6)
- # nrepl (1)
- # off-topic (6)
- # re-frame (52)
- # shadow-cljs (132)
- # spacemacs (4)
- # tools-deps (26)
@weavejester why we need
:prep-tasks ["javac" "compile" ["run" ":duct/compiler"]] ??? I don't see any definition for
If you're not using compilers, and not using any modules that use compilers, the
:prep-tasks addition can be removed.
Ductifying https://github.com/ptaoussanis/sente means 1. adding some routes and 2. including the correct adapter depending on which web server is being used
I haven't had any experience with Sente before. If it's just adding some routes that sounds straightforward. If it requires a custom adapter as well you'll need to write an
halt-key method around that.
and should duct prep select the adapter to include for me based on its knowledge of which web server i'm using?
By "Duct model" are you writing a module for this, or is it just a single-use thing?
In which case you could add in the server (if one doesn't exist already), and the routes, and whatever else is needed.
it's not a complex library to use but to my eyes it seems to present some new relationships I haven't seen in duct modules before
Or most compatible, since then you don't need to worry about inserting the routes directly into the configuration.
Ring middleware. It would be a key that initializes into a Ring middleware function.
You probably want to take a look at the duct/module.web library. Do something similar, just simpler.
So add in the http-kit server if it's not there already. Maybe add a new keyword relationship.
:duct.server.http/sente-compatible or something like that.
Right. Then you just have the module look for a key that inherits from sente-compatible. If none exist, try to add one. You could also add error handling for the case where there's a web server that isn't sente-compatible.
I'll go fiddle with it and see what I can come up with. thanks for the pointers.
Actually i think i see what you're getting at.