66 < title > The Duct Framework</ title >
77 < link rel ="preconnect " href ="https://fonts.googleapis.com ">
88 < link rel ="preconnect " href ="https://fonts.gstatic.com " crossorigin >
9- < link rel =" stylesheet " href ="https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Bebas+Neue&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap ">
9+ < link href ="https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Bebas+Neue&family=Open+Sans:ital,wght@0,300..800;1,300..800&family= Roboto:ital,wght@0,100..900;1,100..900&display=swap " rel =" stylesheet ">
1010 < link rel ="
stylesheet "
href ="
https://cdn.jsdelivr.net/npm/[email protected] /css/bulma.min.css "
> 11+ < link rel ="
stylesheet "
href ="
https://cdn.jsdelivr.net/gh/highlightjs/[email protected] /build/styles/an-old-hope.min.css "
> 1112 < link rel ="stylesheet " href ="style.css ">
13+ < script src ="
https://cdn.jsdelivr.net/gh/highlightjs/[email protected] /build/highlight.min.js "
> </ script > 14+ < script src ="
https://cdn.jsdelivr.net/gh/highlightjs/[email protected] /build/languages/clojure.min.js "
> </ script > 15+ < script > hljs . highlightAll ( ) ; </ script >
1216 </ head >
1317 < body >
1418 < section class ="hero ">
@@ -22,5 +26,37 @@ <h1 class="title">
2226 </ div >
2327 </ div >
2428 </ section >
29+ < section class ="section ">
30+ < div class ="container is-max-tablet ">
31+ < p class ="is-size-5 ">
32+ Define the structure of your application as pure data in
33+ < strong > duct.edn</ strong > .
34+ </ p >
35+ < pre class ="highlight "> < code class ="language-clojure "> {:system
36+ {:duct.module/logging {}
37+ :duct.module/sql {:migrations #duct/include "db/migrations.edn"}
38+ :duct.module/web {:features #{:api}
39+ :routes [["/items" #ig/ref :demo.routes/items]]}
40+ :demo.routes/items {:db #ig/ref :duct.database/sql}}}</ code > </ pre >
41+ < p class ="is-size-6 ">
42+ < strong > Modules</ strong > remove repetition while still allowing you
43+ to override any data they add.
44+ </ p >
45+ < p class ="is-size-6 ">
46+ Use < strong > functions</ strong > and < strong > multimethods</ strong > to
47+ define the behavior of your components.
48+ </ p >
49+ < pre class ="highlight "> < code class ="language-clojure "> (ns demo.routes
50+ (:require [next.jdbc :as jdbc]))
51+
52+ (defn list-items [{:keys [db]}]
53+ (fn handler [_request]
54+ {:body {:results (jdbc/execute! db ["SELECT * FROM items"])}}))</ code > </ pre >
55+ </ div >
56+
57+ < div class ="container has-text-centered ">
58+ < a class ="button is-primary is-rounded is-size-5 " href ="# "> Read the docs</ a >
59+ </ div >
60+ </ section >
2561 </ body >
2662</ html >
0 commit comments