As far as I can tell 90% of information that can be found through a google search on compojure/ring is outdated for 0.4.0.
Can anyone point me toward some good current documentation?
Thanks!
...
I'm writing a Compojure TODO app and with MySQL as the primary data store. I'm using clojure.contrib.sql to interface with MySQL as follows:
(def db {:classname "com.mysql.jdbc.Driver"
:subprotocol "mysql"
:subname "//localhost:3306/todo"
:user "<user>"
:password ""})
The queries I'm using seem to w...
I want to develop apps on GAE using Clojure with Compojure, using either Eclipse or Idea, emacs is not a bad idea :P
So which are the best ways to do this? I don't think that I want to use leiningen because I believe that maven can be very strong if you pass the learning curve - I read this blog http://compojureongae.posterous.com/tag/g...
I'm new to Clojure and have been using Compojure to write a basic web application. I'm hitting a wall with Compojure's defroutes syntax, though, and I think I need to understand both the "how" and the "why" behind it all.
It seems like a Ring-style application begins with an HTTP request map, then just passes the request through a seri...
Is there a way I can set a div background color in hiccup? Here is what I tried so far, with no result:
[:div {:background-color "#003366"} (escape-html rest)]
In the html, I see <div background-color="#663366"> which I do not believe is the correct format for color.
Is there a way to do this in hiccup?
...
I'm trying to make http requests from my Google App Engine webapp, and discovered I have to use URLConnection since it's the only whitelisted class. The corresponding Clojure library is clojure.contrib.http.agent, and my code is as follows:
(defroutes example
(GET "/" [] (http/string (http/http-agent "http://www.example.com")))
(rou...
I'm developing a web application using Compojure and I would hugely appreciate a small and complete example of storing and retrieving session data.
Many thanks in advance,
James.
...
Compojure does not bind the fields in a POST form. This is my route def:
(defroutes main-routes
(POST "/query" {params :params}
(debug (str "|" params "|"))
"OK...")
)
When I post a form with fields in it, I get |{}|, i.e. there are no parameters. Incidentally, when I go http://localhost/query?param1=value1, params is not em...
I have a small compojure site, with the routes defined as such:
(defroutes example
(GET "/" [] {:status 200
:headers {"Content-Type" "text/html"}
:body (home)})
(GET "/*" (or (serve-file (params :*)) :next))
(GET "/execute/" [] {:status 200
:headers {"Content-Type" "text/html"}
...
I've written a little internal webapp that I use to import invoices from our jobcard database into MYOB. I've written it using Clojure and Compojure, and it actually works pretty well, and it was also a good learning exercise for me.
However, I've got a problem, it seems that after a successful invoice import the jetty server will no l...
I have the following routes definition:
(require '[compojure.core :as ccore]
'[ring.util.response :as response])
(def *main-routes*
(ccore/defroutes avalanche-routes
(ccore/GET "/" [] "Hello World 2")
(ccore/GET "/images/:id" [id] (get-image-response id))))
In this example, requesting / works like a charm ...
Hi,
We are running nginx as a reverse proxy that forwards requests to a Clojure application running Compojure, a library that wraps around Jetty and provides our application with the ability to service web requests.
We currently capture logs generated by both nginx and the Clojure application (via log4j to syslog). We are unable, howev...