Questions tagged [noir]

Noir is a micro-framework that allows you to rapidly develop websites in Clojure.

Noir uses the Compojure library for URL routing, Ring for low level HTTP, and Hiccup for HTML generation. It is a web application framework that builds on top of these things to provide an environment for building web applications.

85 questions
1
vote
2 answers

What characters are permitted for a slug in noir?

I have a Clojure service that I'm exposing via REST. I have a page defined as: (defpage "/package_versions/:id" {:keys [id]} (do (println "ID: " id) (if-let [pv (pv/fetch-one (db/keyspace) id)] (response/json pv) …
MrEvil
  • 6,605
  • 6
  • 33
  • 34
1
vote
1 answer

How to save a user in noir session in a compojure web project?

I have to save a username in a session and I can't seem to make it work. This is my code (sesh is noir session): (defn set-loggedin [username password] (do (sesh/put! :username (:user username)) (sesh/put! :password (:pass password)))) (defn…
1
vote
1 answer

Is there an open source project that uses Hoplon and that handles web authentification?

I am looking for something similair to noir-auth-app but made with hoplon. Thanks!
leontalbot
  • 2,423
  • 1
  • 19
  • 27
1
vote
1 answer

Can you set the size limit of a post request in header?

I'm trying to make a post request to my noir server but I have too many parameters and the server just responds with 413 status code. I was wondering if I could raise the character limit for the post request. I read it's possible with other services…
sheldonk
  • 2,404
  • 2
  • 20
  • 29
1
vote
1 answer

Special REPL support for Noir?

I'm using eclipse with counterclockwise plugin. If I edit the file, changes are not reflected until I press ctrl+alt+s. For example, if I change (def foo 1) to (def foo 2) and type foo in the repl, it prints 1 not 2 until I press…
alice
  • 2,347
  • 4
  • 20
  • 26
1
vote
1 answer

How to redirect WITHIN the server in noir?

Noir provide (response/redirect "url") for client-side 302 redirect. But how to redirect within the web server its-self? For example, writing a login page, if logging failed, how to redirect to the error page with a message? (defpage [:post…
qiuxiafei
  • 5,447
  • 5
  • 27
  • 41
1
vote
1 answer

How to host CGI application?

Up to now i have tested hunchentoot-cgi(CL), mighttpd2(Haskell), ocsigen(OCaml), yaws(erlang) to host an old python CGI application. Except hunchentoot-cgi, all work great. I like Lisp-style programming, so i really want to host the application in…
z_axis
  • 7,414
  • 6
  • 37
  • 56
1
vote
2 answers

Trouble getting defroutes to work in webnoir

So, I'm a clojure n00b, and I'm missing something when trying to get the routes for a project I'm building working. I had some issues with circular dependencies, and after working with Django, I think it's much better to have routes all defined in…
KyleWpppd
  • 1,900
  • 1
  • 14
  • 16
1
vote
1 answer

Content negotiation in Noir

What is the prefered way to do content negotiation in the Noir framework? I am aware of this clj-conneg, but I'd like to know if similar functionality is already included in Noir.
Timo Westkämper
  • 20,443
  • 4
  • 67
  • 103
1
vote
1 answer

Keeping a global monger connection accessible from all models

Being new at both Clojure, Noir and Monger I'm facing just a small issue. As seems standard in Noir I keep my models in src/app_name/model_name.clj The problem I'm facing is that I need to make the same connection to MongoDB in each model, as I…
Emil Ahlbäck
  • 5,837
  • 8
  • 34
  • 52
1
vote
0 answers

Simple noir server won't start

I've just started to learn Clojure, and thought a good way to dive into it would be to write a simple Noir website. I've installed leiningen, did lein self-install and installed the lein noir plugin. When I create a dummy project ... >> lein noir…
pdeuchler
  • 149
  • 2
  • 9
1
vote
1 answer

webapp using Noir: how to display dependent drop-down menus without resorting to javascript

I am trying to write a simple web application using Noir that has a series of drop-down menus whose contents change, depending upon what was selected in the previous drop-down menu(s). These options are then submitted as a form. While there exists…
etosch
  • 180
  • 7
1
vote
1 answer

CSS loading is slow on heroku hosted site

I am using heroku to host a clojure app using noir. Its the free account with one web dyno. I have trouble in that the content of the site load, however the CSS doesnt load. On couple of refreshes it will load back properly. However if I was to…
murtaza52
  • 45,047
  • 27
  • 78
  • 118
1
vote
0 answers

Passing "filename" in the headers of noir.response

Can anyone guide me as to how can I pass the "filename", in the headers, of the "noir.response" ? Shiwani
0
votes
1 answer

How to use IR leds that is not working on Pi camera

For a night vision camera, I bought NoIR Pi camera and IR leds(Can be attached to both sides of the camera). But I found that my Pi camera doesn't have metal part on the attaching part. So I cannot use my IR leds with pi camera. Can I use it with…
stl.P
  • 1
  • 1