Fork me on GitHub

hi, for a simple web application with a form, how do you deal with https? I was thinking in setting up stunnel to deal with the SSL certificate, OCSP and then routing HTTP to the Clojure application. Since I've never set up such a thing in Clojure, would like to hear from experienced people


I think most people just use nginx as a reverse proxy


If you want a live example a clojure app doing these kinds of things checkout


I was about to embark with the book "Web Development with Clojure 2nd ed", I wonder which is easiest for the first time


@lum Make sure you use the hard coded versions in the book. Luminous has changed a bit since its been published.

Volodymyr Sereda14:04:26

Mhm, we just use a Compojure clojure server behind nginx which can handle all the SSL.


hi, few questions - i just found out about clj and new way of specifing dependencies: deps.edn however cannot easily find what is the recommended way to specify some startup commands to evaluate everytime. do i always needs to use --init with clj tool? - i plan to learn boot build tool. going forward id like to use just a single place to put my deps in. i saw there is a plugin for boot to work with deps.edn, having built in support out of the box would be better tho. is there a plan for that or deps.edn is kind of experimental and suggested just for small script like usage?


There is I like it, but you don’t need to have it your clojure embedded in nginx


@prozz you might be interested to see how Robert Stuttaford works with deps.edn and the new clj tool Its not just meant for scripts or small programs. It should be able to handle most things you throw its way

👍 4

thanks for it, will read!

athomasoriginal15:04:55 is another example, a little more complex, but can really show you some interesting ways of working with it


😄 project.clj ;; so CIDER can locate the project root


haha seriously...


@prozz can you actually create a Cider REPL in that project? I get the following error whenever I cider-jack-in

error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Exception in thread "main" Could not locate com/billpiel/sayid/nrepl_middleware__init.class or com/billpiel/sayid/nrepl_middleware.clj on classpath.


@joelsanchez Once (not with clojure), tried to configure a nginx reverse proxy with SSL for more than one site and got into some problems, my fault for sure

Denis G16:04:57

Guys, I want to create something like an adt in clojure. A tree with different kind of nodes and then visit them and do some stuff. What would you advise me to use? Obviously I need some kind of pattern matching with cond, so that I can do different actions depending on which kind of node I am at. Any suggestions?


@denisgrebennicov often a multimethod is better than a cond block


one approach is to use a keyword in a hash map to designate the :type of a node, then a :children key with a vector of more maps


also, sometimes normalizing into an adjacency list is easier than an actual tree, depending on what kind of transformations you need to do on the structure

Denis G17:04:02

of course! multimethods! Thanks a lot!