This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-07
Channels
- # announcements (7)
- # beginners (123)
- # calva (27)
- # cider (23)
- # clj-kondo (4)
- # cljsrn (7)
- # clojure (29)
- # clojure-dev (7)
- # clojure-europe (4)
- # clojure-italy (4)
- # clojure-nl (16)
- # clojure-uk (47)
- # clojurescript (1)
- # code-reviews (4)
- # cursive (4)
- # data-science (4)
- # datomic (30)
- # duct (4)
- # fulcro (4)
- # graphql (1)
- # kaocha (4)
- # mount (8)
- # off-topic (13)
- # overtone (1)
- # pedestal (2)
- # planck (3)
- # re-frame (9)
- # reagent (50)
- # ring (12)
- # shadow-cljs (38)
- # spacemacs (5)
- # testing (13)
- # tools-deps (55)
- # vim (30)
- # xtdb (13)
HI guys, just started learning duct ( although i use integrant in the front end for a framework i am building ).
I have used luminus for a backend so familiar with the main ring / compojure ecosystem.
So, a possibly stupid question, but i have found no examples to orient myself ...
how would i implement cors when using :duct.module.web/api
or :duct.router/cascading
?
any direction would be appreciated. cheers
@clojurians827 I think it is happening because :duct.migrator/ragtime
and [:duct.migrator.ragtime/sql :todo.migration/create-entries]
should be in the base profile
{:duct.profile/base
{:duct.core/project-ns todo
:duct.router/ataraxy
{:routes {[:get "/"] [:todo.handler/index]}
:handlers {:todo.handler/index #ig/ref :todo.handler/index}}
[:duct.handler.static/ok :todo.handler/index]
{:body {:entries "/entries"}}
:duct.migrator/ragtime
{:migrations [#ig/ref :todo.migration/create-entries]}
[:duct.migrator.ragtime/sql :todo.migration/create-entries]
{:up ["CREATE TABLE entries (id INTEGER PRIMARY KEY, content TEXT)"]
:down ["DROP TABLE entries"]}}
:duct.profile/dev #duct/include "dev"
:duct.profile/local #duct/include "local"
:duct.profile/prod {}
:duct.module/logging {}
:duct.module.web/api {}
:duct.module/sql {}}