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
1 answer

slf4j File Not Found error when building uberwar

I would like to understand why my Ring application is attempting to open the log file at compile time. I have a webservice in Compojure and Ring. The application works without issue but whenever I compile the application to an uberwar or run lein…
egerhard
  • 1,089
  • 1
  • 9
  • 18
0
votes
1 answer

How can I test a heroku database on travis securely?

I'm using Ring(Clojure) on Heroku and I'm implementing some tests in the app. Some of the tests are GET requests to the app, and the app has a PostgreSQL database that fills some pages. But, to do so, the app has to connect to the original Heroku…
EuAndreh
  • 578
  • 3
  • 16
0
votes
1 answer

How can I conditionally load functionality in a clojure web-app

I have a clojure web app (standard ring handlers and compojure routes on a jetty server) for which I enabled live asset recompilation as middleware, which has been very very handy in development. As we get closer to production I would like to find a…
flightlessbird
  • 413
  • 3
  • 9
0
votes
1 answer

Ring session being reset with each save (Compojure)

Each time I save a Clojure source file in Ring project, the session resets. Note the ring-session ids. I preceded each by saving my handler.clj file: 2015-03-17 11:02:51,857 INFO onelog.core: Starting :get / for 127.0.0.1 {"accept-encoding" "gzip,…
KendallB
  • 4,799
  • 4
  • 19
  • 21
0
votes
1 answer

How to disable SSLv3 for embedded Jetty server for Ring application?

This answer to the Java version of this question – How to disable the SSLv3 protocol in Jetty to prevent Poodle Attack – covers how to do this, but what's the equivalent minimal code to do the same for a Clojure web application using Ring and the…
Kenny Evitt
  • 9,291
  • 5
  • 65
  • 93
0
votes
2 answers

Is there some way to let compojure support type conversion automatically?

Now can use compojure this way: (GET ["/uri"] [para1 para2] ) Para1 and para2 are all of type String. I would like to let it know the type correcttly,like this: (GET ["/uri"] [^String para1 ^Integer para2] ) It can convert para1 to be Sting…
user2219372
  • 2,385
  • 5
  • 23
  • 26
0
votes
1 answer

How do I add webjars resources to lib-noir's app-handler?

How do I add webjars resources to lib-noir's app-handler? I used to do this only using Ring like this: (def app (-> handler (wrap-resource "public") (wrap-resource "/META-INF/resources") ;;resources from webjars )) Now I'm…
Michiel Borkent
  • 34,228
  • 15
  • 86
  • 149
0
votes
1 answer

Best way to customize Swagger / Compojure 404 response

In Compojure one can define default 404 behavior, e.g., (defroutes app-routes ;; ... (route/not-found "These aren't the droids you're looking for.")) As we've been increasing the number and complexity of REST endpoints, we've been looking into…
JohnJ
  • 4,753
  • 2
  • 28
  • 40
0
votes
1 answer

Clojure: Use Rook and Ring to provide a REST interface and serve static HTML/JS

I have written some Clojurescript code that requires a REST interface for its communication with the server. The backend is currently in Python and I wanted to move it over to Clojure. Now I found rook https://github.com/AvisoNovate/rook which…
wirrbel
  • 3,173
  • 3
  • 26
  • 49
0
votes
1 answer

find correct ablsolute path to app folder clojure/ring

I using clojure+ring for build web application running on Glassfish 3. For correct initialization log4j i need find correct absolute path to WEB-INF folder. Is the any way to determine absolute path to WEB-INF folder in web app running on…
Amigo
  • 109
  • 7
0
votes
0 answers

How can you use imagemin with WebJars from Clojure?

As far as I can tell WebJars are designed to serve up static assets from a JVM based back end. There is a WebJar library for imagemin, but imagemin is a build time or run time concern. The browser has no idea what to do with gifsicle.exe or the…
Peter Stephens
  • 1,040
  • 1
  • 9
  • 23
0
votes
1 answer

How do I shutdown Hikari connection pool in clojure ring web app deployed to tomcat in elasticbeanstalk

I've got HikariCP running in my clojure ring app for connection pooling. The problem is I don't know of a good place to close the pool so I'm not. I allow the pool to die when the app does and never explicitly close it. It appears this is leaking…
0
votes
0 answers

Securing a local-only Compojure/Ring Webapp?

I want to create a Ring/Compojure webapp that would enable a clojure repl. All of this is meant to be running on a local machine and the webapp is just a convenient GUI for the local user. Since it is a enabling a repl, I want it to be secure. …
Roger Allen
  • 2,262
  • 17
  • 29
0
votes
1 answer

Where to initialize logging in a Compojure app?

I have a Compojure app generated using Luminus. I want to configure logging using clj-logging-config but I'm struggling mightily with this. I put the (!set-logger) command in the init function (declared with {:ring {:init} in project.clj) but I…
Matthew Gertner
  • 4,487
  • 2
  • 32
  • 54
0
votes
1 answer

Clojure Ring auto-refresh script for error screen

When :auto-reload? true, Ring injects an auto refresh