Questions tagged [compojure]

Compojure is an open source web framework for the Clojure programming language.

Compojure

Author: James Reeves
Categories: web
License: EPL
Source code: https://github.com/weavejester/compojure

Dependencies: clojure.contrib, a Java servlet container (e.g. Jetty)

Compojure is a web framework that emphasizes a thin I/O layer and a functional approach to web development. It includes an integrated Jetty web server, but can be used with any Java servlet container.

FAQ

Useful links

442 questions
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
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

Enlive snippet giving me odd HTML

Problem: Enlive snippet making funky HTML Visual reference of problem: http://i.imgur.com/FIOzgZv.png See bottom of code snippet for strange HTML in question (ns notebook.handler (:require [compojure.core :refer :all] …
deadghost
  • 5,017
  • 3
  • 34
  • 46
0
votes
2 answers

How do I handle some but not all http methods in compojure with Liberator?

I'm using liberator with compojure, and wanted to send multiple methods (but not all methods) to the save resource. Rather than repeating myself, I'd like to have something that defines multiple handlers at once. An example: (defroutes abc (GET…
jwhitlark
  • 505
  • 3
  • 16
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

Compojure session handling across concurrent requests

I have a long running POST request which updates the session with the requested result. Now, when such concurrent POST requests are made from the same session, the updates done in concurrent request don't get visibility across each other. The effect…
Binita Bharati
  • 5,239
  • 1
  • 43
  • 24
0
votes
1 answer

How to unpack a .jar file after creating one in Lieiningen?

I run lein uberjar and I can deploy the project. The problem is that I don't know how to "undo" the .jar file and revert it back to Clojure. I looked around but I haven't been able to find any solution. The reason I'd like to do this is because I…
dizzystar
  • 1,055
  • 12
  • 22
0
votes
1 answer

Alter tables with lobos migrations

Anybody knows how to alter table (add column) with lobos migrations? There is no documentation on this that I can find -- any help would be greatly appreciated.
dmitryame
  • 478
  • 4
  • 19
0
votes
2 answers

Clojure Clostache error - No implementation of method: :make-reader of protocol: #'clojure.java.io/IOFactory found for class: nil

Am using clojure - 1.5.1, compojure - 1.1.5, clostache - 1.3.1. The template file is present under resources/public/templates folder. Code : (:require [clostache.parser :as cp]) (cp/render-resource "templates/connectionDetails.mustache"…
Binita Bharati
  • 5,239
  • 1
  • 43
  • 24
0
votes
2 answers

Where to put monger connection in Compojure app for Heroku?

I created a compojure app using lein new compojure mongotest with lein 2.0, and a Procfile web: lein ring server-headless $PORT. This worked fine, but now when I add (def mongolab-url (System/getenv "MONGOLAB_URI")) (println…
Dax Fohl
  • 10,654
  • 6
  • 46
  • 90
0
votes
1 answer

Using LevelDB in a ring/compojure webapp

I am am trying to setup LevelDB in a ring/compojure app, and looking for an idiomatic way to to access the opened db descriptor into each request. For example: (defn -main "I don't do a whole lot ... yet." [& args] (println "Opening LevelDB…
0
votes
1 answer

Compojure Ring Server Generated By 'lein ring server' Acting Oddly

So I was coding and I got an exception. I fixed the exception and then went back to check that things were working. Instead of seeing my fixes I instead saw the website that was generated prior to the exception having been thrown. Like my previous…
Joshua
  • 547
  • 1
  • 5
  • 13
0
votes
1 answer

Compojure Example from Clojure in Action Not Working

I am working on the Compojure example from Clojure in Action page 232 (ns compojure-test.core (:gen-class) (:use compojure)) (defroutes hello (GET "/" (html [:h1 "Hello world"])) (ANY "*" [404 "Page not found"])) (run-server {:port 8080}…
David Williams
  • 8,388
  • 23
  • 83
  • 171
1 2 3
29
30