Questions tagged [ring]

Ring is a Clojure web applications library written by Mark McGranaghan. It was inspired by Python's WSGI and Ruby's Rack. By abstracting the details of HTTP into a simple, unified API, Ring allows web applications to be constructed of modular components that can be shared among a variety of applications, web servers, and web frameworks.

Ring is a Clojure web applications library written by Mark McGranaghan. It was inspired by Python's WSGI and Ruby's Rack. By abstracting the details of HTTP into a simple, unified API also known as the Ring spec, Ring allows web applications to be constructed of modular components that can be shared among a variety of applications, web servers, and web frameworks.

Mark gave a presentation which provided an overview of Ring at Clojure conj called "One Ring to Bind Them".

479 questions
0
votes
0 answers

clojure ring handler returning json - done of xhr of backbone collection not called

I have a clojure running server whose one endpoint returns simple json. I make a callback from backbone.js collection to this endpoint. I have put a done handler on the return xhr of the fetch() of collection. However, this done callback is never…
Ashish Negi
  • 5,193
  • 8
  • 51
  • 95
0
votes
1 answer

Cleaning up state on code reload when running Ring and Compojure

I'm writing a Compojure based application and can't get the hang of how to handle cleaning up state when the code is reloaded. Specifically, my app has an open handle to a LevelDB database, and this needs to be either reused or closed properly…
Theo
  • 131,503
  • 21
  • 160
  • 205
0
votes
1 answer

Clojure ring server seems to be missing dependencies on slf4j

I've been trying to follow a number of tutorials on building a web app in Clojure, but I keep running into the same problem. To take the simplest case, I tried following this tutorial:…
scottb
  • 1,135
  • 11
  • 17
0
votes
2 answers

Connect to browser with austin

I followed along the following instructions for my own project: https://github.com/cemerick/austin/tree/master/browser-connected-repl-sample. I think things derailed at step 2: Once you're in the REPL (it will start up in the sample app's main …
deadghost
  • 5,017
  • 3
  • 34
  • 46
0
votes
1 answer

is there a var_dump like function in clojure?

I like printf debugging, is there a function in clojure that works like php's var_dump that prints anything it gets? I'm trying to parse html with jsoup and I'd like to see what I'm doing by printing it as a ring response, in the REPL I see the…
erik
  • 3
  • 1
0
votes
1 answer

Setting up ClojureScript

I have been trying the following in the command line to get ClojureScript running $ lein cljsbuild auto. But keep getting a warning unable to find crossover: web-viz.x-over. The crossover line is in my project below (defproject web-viz …
sunspots
  • 1,047
  • 13
  • 29
0
votes
3 answers

Lein ring server 404

I am setting up a web application building a route and handler with Ring and Compojure. Every time I try lein ring server I get a 404 Not Found. But I should see Edit After starting the server I am asked by IE to open or save the file. But…
sunspots
  • 1,047
  • 13
  • 29
0
votes
1 answer

How can I intercept a Compojure request and execute it based on a test?

I have some routes. (defroutes some-routes (GET "one" [] one) (GET "two" [] two)) (defroutes other-routes (GET "three" [] three) (GET "four" [] four)) (defroutes more-routes (GET "five" [] five) (GET "six" [] six)) (def…
Joe
  • 46,419
  • 33
  • 155
  • 245
0
votes
1 answer

No valid DB connection selected

I'm developing a web project using Clojure, and I ran into the following problem. I've defined a db connection with korma using the following code in (ns foo.models.db) (defdb db (mysql {:host "localhost" :port "3306" :db…
albusshin
  • 3,930
  • 3
  • 29
  • 57
0
votes
3 answers

css won't modify html in clojure/heroku web-app

I am making a simple Clojure web-app to be deployed on Heroku consisting of one html and one css file. I created the file using the "lein new heroku MYAPP" command and am trying to modify it from a simple "hello world" to have it render an html file…
kurofune
  • 1,055
  • 12
  • 26
0
votes
1 answer

Friend authentication empty param

I am trying to implement friend authentication on my web app but when i try to login i get this */login?&login_failed=Y&username=*...my param is empty and i cant login,what am i doing wrong? these are my routes... (defroutes routes (GET "/" []…
Shile
  • 1,063
  • 3
  • 13
  • 30
0
votes
1 answer

What type of parameters should I pass to this method

I'm new to Clojure, and I am using ring.velocity to develop a webapp. Here is my ring.velocity.core/render method: (defn render [tname & kvs] "Render a template to string with vars: (render :name \"dennis\" :age 29) :name and :age are the…
Nile
  • 386
  • 5
  • 15
0
votes
1 answer

Is there a relation between available RAM and Ring size in OpenStack SWIFT?

I was reading about OpenStack SWIFT and its different components. But I have a doubt, if available RAM is more, then can we afford to have Rings of bigger size ? And how does Ring Size affect the system ?
Akash B
  • 99
  • 8
0
votes
2 answers

Static vs REST routing with clojure ring

I'm writing an angular/clojure ring webapp. All routes to the ring side will have an "/api" prefix and will be routed with compojure. Serving upp all other static file with ring seems a bit messy though. Is there a good way to direct…
4ZM
  • 1,463
  • 1
  • 11
  • 21
0
votes
1 answer

Expire all sessions for a particular user?

What's a good way to expire all sessions for a particular user? I thought of maintaining of separate map of user->session, but I'm not sure how to update the map when the session cookies expire.
yayitswei
  • 4,587
  • 5
  • 27
  • 34
1 2 3
31
32