Fork me on GitHub
#beginners
<
2015-06-17
>
meow04:06:20

@chris: I just came across this nice explanation of reify: http://decomplecting.org/blog/2014/10/29/reify-this/

escherize08:06:46

whats the best way to pull out query params using compojure?

escherize08:06:50

and is it this:

(ns hello-world
  (:use compojure.core, ring.adapter.jetty)
  (:require [compojure.route :as route]
            [compojure.handler :as handler]))

(defroutes main-routes
  (GET "/" {params :params} (str "<h1>Hello World</h1>" (pr-str params)))
  (route/not-found "<h1>Page not found</h1>"))

(defn -main [& m]
  (run-jetty (handler/site main-routes) {:port 8080}))

akiva13:06:11

I don’t see anything wrong with that.