Questions tagged [luminus]

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

102 questions
1
vote
1 answer

Testing clojure with kerodon

I'm testing a clojure luminus/selmer application with kerodon. I'm getting a java.lang.IllegalArgumentException: field could not be found with selector "[:#name]" when trying to access an input field with id=name as follows: (deftest home (->…
joeabala
  • 266
  • 3
  • 11
1
vote
1 answer

File is downloaded instead of being displayed in the browser

I have created a brand new app from the luminus app template using lein new luminus my-app +postgres +auth +cljs +swagger. In the generated file src/clj/my_app/routes/home.clj the following compojure route is created: (GET "/docs" [] (response/ok…
Robert
  • 121
  • 6
1
vote
2 answers

Clojure luminus framework how to call mongodb connect with mount

I started to develop using Clojure luminus framework with mongodb (with monger library). It was very hard to understand how to implement mount library to start the db connection. I figured out that code should put handler.clj 's init function. But I…
Dan Jay
  • 874
  • 10
  • 27
1
vote
1 answer

If tag in Selmer (clojure templating engine similar to Django)

I am trying to do an admin page for a webapp, displaying the status of a user ("User" or "Admin"). Here is an extract of the Selmer template I wrote: {% for user in users %} {{user.admin}} {% if {{user.admin}}…
1
vote
1 answer

Looping through JSON in a Selmer template

I`m making simple quiz game and want to store the questions in a JSON file like so: {"questions": [ { "question":"2+2 ?", "answer_A":1, "answer_B":2, "answer_C":3, "answer_D":4, …
Cosaquee
  • 724
  • 1
  • 6
  • 22
1
vote
1 answer

Clojure - OpenID - Luminus - Steam Integration

I am new to Clojure and using Luminus to build a website, I have been trying to integrate OpenID to my site but I am failing so bad. I have this code example:…
Fiat Pax
  • 417
  • 6
  • 18
1
vote
1 answer

HTML Link to Database Item -- Clojure Web Development

I am currently writing a website via Clojure code that runs on a Luminus based framework. I have a database that stores users and uploaded files (and routes which allow me to do both). The routes call SQL functions that I have written, altering the…
Logan
  • 1,172
  • 9
  • 23
1
vote
1 answer

How to connect to PostgreSQL in Heroku with Luminus?

I just created a Luminus app and it has two separate places where database access is defined. In project.clj for ragtime: :ragtime {:migrations ragtime.sql.files/migrations :database…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
0
votes
0 answers

Luminus- accessing data from a REST API route in a selmer template

I would like to make a Luminus app that provides a REST API and serves data from that API in Selmer templates. However, I can't figure out how to get the routing to work. For example, if you create a luminus template using the command lein new…
0
votes
3 answers

Function in namespace isn't being read?

I set up a basic luminus template with postgres. I want to be able to add new users and authenticate them, following an example from Ch.6 p.168 in this book: https://pragprog.com/titles/dswdcloj3/web-development-with-clojure-third-edition/ I had…
0
votes
1 answer

Circular dependency?

I set up a basic luminus template with postgres. I want to be able to add new users and authenticate them, following an example from Ch.6 p.168 in this book: https://pragprog.com/titles/dswdcloj3/web-development-with-clojure-third-edition/ I had…
0
votes
2 answers

No suitable driver in Luminus H2 Guestbook app

Trying to create the simple example app from Leiningen with Luminus template and H2 db. Nothing fancy, I literally see tons of examples doing this but always get No suitable driver. lein new luminus guestbook +h2 cd guestbook lein run Syntax error…
Todd W Crone
  • 1,185
  • 8
  • 23
0
votes
0 answers

no database found when running lein migration

I am uisng luminus to build a webpage with sqlite. When I try to migrate (lein run migrate) I get the following message: batch entry 0: [SQLITE_ERROR] SQL error or missing database (near "auto_increment": syntax error) my dev-config.edn: ;;…
0
votes
0 answers

cannot create luminus project with sqlite and clojurescript support

I am trying to create a luminus project with sqlite and cljs support with this command: lein new dbscript +sqlite +cljs but I keep getting this error message all the time: Failed to resolve version for dbscript:lein-template:jar:RELEASE: Could not…
0
votes
1 answer

Create multi thread in clojure

I have this code: (do ;**[1]** (.start (Thread. (http/get "http://127.0.0.1:8001/cardiologista/api/auth/ms1" {:query-params {:verify "my-hash"}})) ) ;**[2]** …