This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-10
Channels
- # aleph (4)
- # announcements (27)
- # aws (12)
- # aws-lambda (1)
- # beginners (207)
- # boot (4)
- # calva (8)
- # cider (9)
- # clj-kondo (9)
- # cljs-dev (27)
- # cljsrn (6)
- # clojure (104)
- # clojure-android (3)
- # clojure-dev (9)
- # clojure-finland (2)
- # clojure-italy (18)
- # clojure-spec (8)
- # clojure-uk (100)
- # clojurescript (43)
- # clojutre (1)
- # core-async (49)
- # cursive (18)
- # data-science (3)
- # duct (24)
- # events (2)
- # fulcro (27)
- # immutant (1)
- # off-topic (32)
- # om (2)
- # onyx (2)
- # pathom (14)
- # pedestal (2)
- # planck (3)
- # re-frame (38)
- # reagent (7)
- # reitit (10)
- # rewrite-clj (7)
- # ring-swagger (3)
- # shadow-cljs (32)
- # spacemacs (63)
- # test-check (16)
- # tools-deps (5)
- # vim (21)
@romain I use Reitit in duct together with pedestal
Together with pedestal?
Do you have any sample project to show or module you built to replace ataraxis with reitit?
Hi @romain. I’ve just added duct + pedestal + reitit example https://github.com/khmelevskii/duct-pedestal-reitit
Please pay attention, I added duct.module/sql
and configured it using postgres
. So you should run postgres database or comment duct.module/sql
parts before run app
@y.khmelevskii What's reason behind this setup?
I mean pedestal already has router, and why do we need duct here?
@UCMNZLJ93 I love reitit because it’s data-driven router. I can describe routes in one place and use them on backend and frontend. Also coercion is great! You can read reasons of using reitit in pedestal instead of native pedestal router here https://metosin.github.io/reitit/http/pedestal.html Reitit benchmarks looks awesome too https://github.com/metosin/reitit/blob/master/doc/performance.md About duct. For me it’s great framework with data-driven architecture based on integrant. It’s very easy to describe module dependencies and mock them during tests. And about pedestal, I like interceptors and they very useful for me. I store some logic in their for manage different cases
No, I didn’t use luminus
I think you are using Duct and Integrant here only for state management of server side, you can use Mount for this purpose too.
Is it possible to use these with CLJ deps tools
? because I'm using it instead of leiningen
. And this setup depends on lein -duct
Hi gents! Can you please explain me why duct.database/sql
doesn’t work when I configure connection in config.edn
not dev.edn
. I catch the following exception:
class duct.database.sql.Boundary cannot be cast to class clojure.lang.IFn
(duct.database.sql.Boundary is in unnamed module of loader
clojure.lang.DynamicClassLoader @1cc6aa6c; clojure.lang.IFn is in unnamed
module of loader 'app')
so, if in example lein new duct my-app +api +ataraxy +example +postgres
I will moved duct.database/sql
section from dev.edn
to config.edn
I with catch this problem
@y.khmelevskii Hi. Can you tell me the version of duct yo’re using?
@jahson I used last versions:
duct/core {:mvn/version "0.7.0"}
duct/module.sql {:mvn/version "0.5.0"}
Where do you place your duct.database/sql
section in config.edn
? It seems like you’ve placed it outside of the base profile?
I got the error, and the cause is the wrong placement of :duct.database/sql
configuration. Basically it should be in :duct.profile/base
section. The reason is that in the version 0.11
of duct framework the profiles were added, and now the first level of keys in config is for modules / profiles.
@jahson I got you, thank you!
and one more question. I use ragtime and I want to move description af all migrations to separate migration.edn
. In previous version I could use :duct.core/include ["migration"]
but now I should use {:duct.profile/migration #duct/include "migration"]}
. But it doesn’t work for me No method in multimethod 'init-key' for dispatch value: :duct.profile/migration
I think you could just put something like :duct.migrator/ragtime {:migrations #duct/include "migrations"}
or :duct.migrator/ragtime {:migrations [#duct/include "migration1" ...]}
.
What yo’re trying to do is to include the profile called migration
, but your profile isn’t derived from :duct/profile
. You should look for duct_hierarchy.edn
in src
directory and add the derivation, like in https://github.com/duct-framework/core/blob/master/src/duct_hierarchy.edn
thank you for explanation @jahson!
Hi @romain. I’ve just added duct + pedestal + reitit example https://github.com/khmelevskii/duct-pedestal-reitit
Please pay attention, I added duct.module/sql
and configured it using postgres
. So you should run postgres database or comment duct.module/sql
parts before run app