Questions tagged [luminus]

Luminus is a Clojure Web Micro-framework which uses Compojure, Ring and some popular middlewares

102 questions
0
votes
1 answer

Custom files in luminus

Where should I use put code files I write myself in a Clojure luminus application? And how can I export a function from it and import it to another file? Say, I've create a file "helper1.clj", how can I access the functions from it in…
user6574649
0
votes
1 answer

how to use angularjs in clojure luminus

I want to use angularjs in clojure luminus templates. below is my code in luminus.

Name :

0
votes
1 answer

Adding Google Maps to Luminus Reagent page?

I'd like to add a page containing a google maps component to my Luminus application but I can't figure out how to do this. I've tried to follow the Reagent google maps guide but the map won't show. This is the Clojurescript code that I've tried: (ns…
Johan
  • 37,479
  • 32
  • 149
  • 237
0
votes
1 answer

How can I preprocess data before displaying it in Luminus/Compojure?

I have this in Luminus/Compojure project: (defn article-show-single [id] (let [a (db/get-single-article {:id id})] (layout/render "show.html" {:article a})) Now I want to preprocess the the :body of an article. I can this by: (str/replace…
user6324692
0
votes
1 answer

Unable to use a regex in defroute

This routes works in Luminus/Compojure/Ring app (GET "/page/:id" [id] (home-page id)) but this doesn't and throws an error: (GET ["/page/:id" :id #"^[1-9]\d{0,2}$"] [id] (home-page id)) The error is "Page not found", even when I go to the same url…
user6324692
0
votes
1 answer

Luminus -- multiple requests within the same db connection

In my Luminus app I have this: (defn page1 [id] (layout/render "page1.html" {:article (db/get-single-article {:id (Integer/parseInt id)})) I want to perform multiple different requests to the db within the same db connection. How can I do…
user6324692
0
votes
3 answers

How to setup Korma in Luminus or Compojure projects?

I'm trying to use Korma and set it up for my Luminus project. Korma has the following helpers for Postgresql: ;; how exactly should I pass the connection string here? ;; in particular, for production env. (def pg (postgres ..)) (defdb korma-db…
user6324692
0
votes
1 answer

testing clojure luminus application with midje

I'm doing tests on my luminus application and I want to test my post fuction as below. However, the data is posted on the body of the request object as a byte input stream. How do i make the data to be posted on the params key of the request object?…
joeabala
  • 266
  • 3
  • 11
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 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
1 answer

Multiple optional parameters in Luminus / Compojure routes?

I would like to create a route that has multiple optional parameters, detected by the presence of a "keyword" in the URL, and processed in any…
user1559027
  • 343
  • 2
  • 13
-1
votes
1 answer

.DS_Store' does not appear to be a valid migration

Has anyone run across this error when running a migration using luminus? CREATE TABLE users ( id VARCHAR(20) PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30), email VARCHAR(30), admin BOOLEAN, last_login TIME, …
iAmDecim
  • 403
  • 4
  • 11
1 2 3 4 5 6
7