СС
Size: a a a
СС
СС
СС
ST
СС
ST
ST
СС
(defn about-handler [req]
{:status 200
:headers {"Content-Type" "text/plain"}
:body "About page"})
(defn home-handler [req]
{:status 200
:headers {"Content-Type" "text/plain"}
:body "Home page"})
(defn with-router [req]
(case (:uri req)
"/" (home-handler req)
"/about" (about-handler req)))
(def app
(->
with-router
wrap-reload))
СС
СС
ST
(defn about-handler [req]
{:status 200
:headers {"Content-Type" "text/plain"}
:body "About page"})
(defn home-handler [req]
{:status 200
:headers {"Content-Type" "text/plain"}
:body "Home page"})
(defn with-router [req]
(case (:uri req)
"/" (home-handler req)
"/about" (about-handler req)))
(def app
(->
with-router
wrap-reload))
(defn with-router [handler]
(fn [req]
(case (:uri req)
"/" (home-handler req)
"/about" (about-handler req))))
ST
(defn with-router [handler]
(fn [req]
(case (:uri req)
"/" (home-handler req)
"/about" (about-handler req))))
СС
ST
(defn with-router [handler]
(fn [req]
(case (:uri req)
"/" (home-handler req)
"/about" (about-handler req))))
СС
СС
СС
(defn about-handler [req]
{:status 200
:headers {"Content-Type" "text/plain"}
:body "About page"})
(defn home-handler [req]
{:status 200
:headers {"Content-Type" "text/plain"}
:body "Home page"})
(defn with-router [handler]
(fn [req]
(case (:uri req)
"/" (home-handler req)
"/about" (about-handler req))))
(def app
(->
{}
with-router
wrap-reload))
ST
(defn about-handler [req]
{:status 200
:headers {"Content-Type" "text/plain"}
:body "About page"})
(defn home-handler [req]
{:status 200
:headers {"Content-Type" "text/plain"}
:body "Home page"})
(defn with-router [req]
(case (:uri req)
"/" (home-handler req)
"/about" (about-handler req)))
(def app
(->
with-router
wrap-reload))
СС