practicalli / clojure-web-services

Develop production grade server-side web services and APIs using Clojure and REPL driven development
https://practical.li/clojure-web-services
Creative Commons Attribution Share Alike 4.0 International
11 stars 14 forks source link

Passing Database reference into handlers #69

Open practicalli-johnny opened 3 years ago

practicalli-johnny commented 3 years ago

Practicalli: keep the handlers clean by passing database connection to the helper functions See banking on clojure

https://clojureverse.org/t/how-to-manage-database-connection-in-clojure/5067 https://stackoverflow.com/questions/19776462/passing-state-as-parameter-to-a-ring-handler

https://luminusweb.com/docs/database.html

The same approach is also done with component systems such as Integrant, Mount and Component