Questions tagged [luminus]

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

102 questions
3
votes
2 answers

Brand new Luminus app giving Error: Could not find or load main class clojure.main

I just created a Luminus app by running: lein new luminus foobar and when I try to run it with foreman like this: foreman start the way the docs describe, I get this error: Error: Could not find or load main class clojure.main which is also the…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
3
votes
3 answers

compojure get request when route has binds

I use to define my routes in composure like this: (GET "/home" [req] (home-page req)) and then I have the whole request object available to use inside my handler. but now I want to use routes with binds, like: (GET "/details/:id" [id] (details-page…
weeanon
  • 821
  • 10
  • 17
3
votes
1 answer

network connected REPL with leiningen/ring/compojure/luminus

I am running a server with the luminus web framework which uses ring/compojure and I want to be able to connect to my code with a clojure repl. I understand that there is an nrepl server which stands for network repl and that you can connect to it…
CodeKingPlusPlus
  • 15,383
  • 51
  • 135
  • 216
3
votes
1 answer

implementing oauth2 in compojure, how do I wait for the second oauth2 callback before responding to the user's request?

I'd like to get OpenID connect working in my little luminus project. I'm a little new to the workflow in luminus/ring/compojure (coming from django, flask, and servlets mostly). I've successfully redirected to Google so I get the "code" back from…
voodoogiant
  • 2,118
  • 6
  • 29
  • 49
3
votes
3 answers

Configuring MongoDB in a Clojure Luminus web framework

I am having issues configuring a MongoDB database inside a Luminus project. This should be pretty straightforward given the lein templates: https://github.com/yogthos/luminus-template. Typing lein new luminus +mongodb will give you a default…
CodeKingPlusPlus
  • 15,383
  • 51
  • 135
  • 216
2
votes
2 answers

anti forgery token error when calling a clojure function in luminus

I am learning clojure with luiminus and I am trying to parse arguments following an example. By using curl I am sending username and password to be printed calling foo in the following route. However, I get the "Invalid anti-forgery token error".…
2
votes
1 answer

How to Access Environment Variables In Clojure - Luminus Web Framework

I need help accessing my environment variables. I have :my-variable "value" in dev-config.edn and I'm trying to access it in another place. I required [my-app.config :refer [env]] and trying the following: (defn my-function [] (def variable (->…
2
votes
0 answers

Clojure luminus and multiple identical request parameters

Just playing with Luminus and I have a simple search function (def filename "/somewhere/on/my/harddrive") (defn search [request] (let [q (-> request :params :q)] (layout/render request "results.html" {:data (helpers/match-lines-from-filename q…
Christopher Causer
  • 1,354
  • 1
  • 11
  • 13
2
votes
1 answer

Reitit ring. Authentication and authorization in only one set of routes on Luminus

I'm developing a site with Luminus, until now my middleware wrap-base function looks like: (defn wrap-base [handler] (-> ((:middleware defaults) handler) wrap-auth (wrap-access-rules {:rules rules :on-error on-error}) (wrap-authentication…
aarkerio
  • 2,183
  • 2
  • 20
  • 34
2
votes
1 answer

How To Unit Test MongoDB with Luminus?

I'm probably missing something simple, but I'm not experienced enough with clojure to understand the error I'm getting. I have a simple luminus clojure app setup with the Monger library to handle my MongoDB connection. I've added a simple test that…
newBieDev
  • 484
  • 3
  • 11
2
votes
1 answer

Using cprop env information inside swagger setup in a luminus project

I am using swagger to provide an API for a db access program. During development I normally have 2 versions running, the dev version and the prod version that I automatically start on login. I want to have a different title visible on the swagger…
Iain
  • 300
  • 2
  • 13
2
votes
0 answers

Clojure Luminus migratus db/schema file

I'm a new guy from RoR to Clojure/Luminus. After reading the book "web development with clojure", I find a question about DB migration. In Rails, after running a migration file, the newly modified table structure will show in the db/schema.rb file,…
PeterZD
  • 181
  • 1
  • 1
  • 6
2
votes
0 answers

How can I run a Luminus project which uses Overtone?

I'm writing a web app which uses Overtone. When I try running the app using lein run or when I try to start the repl while in the project's directory I get the same error: java.lang.ExceptionInInitializerError at clojure.main.(main.java:20)…
AnaSplash
  • 21
  • 3
2
votes
1 answer

lein javac tries to compile clojure code and fails

I have created a luminus project with the following lein new luminus chess +auth +swagger +cljs I am trying to use the google datastore api but ran into this problem Can't call public method of non-public class: public (Google gcloud library) when…
user782220
  • 10,677
  • 21
  • 72
  • 135
2
votes
1 answer

Carmine connection error during tests

I've a luminus project with some simple compojure-api routes. I've added carmine to communicate with a redis server, using the wcar* macro (defined in services.clj) to make calls to it, and everything works fine. Now I'm trying to add some tests,…
lifeisfoo
  • 15,478
  • 6
  • 74
  • 115