This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-02
Channels
- # adventofcode (20)
- # bangalore-clj (14)
- # beginners (72)
- # cider (2)
- # clara (2)
- # cljs-dev (8)
- # clojure (36)
- # clojure-brasil (201)
- # clojure-greece (29)
- # clojure-nl (1)
- # clojure-poland (1)
- # clojure-russia (2)
- # clojure-spec (5)
- # clojure-uk (4)
- # clojurescript (41)
- # cursive (1)
- # datomic (1)
- # emacs (6)
- # fulcro (80)
- # graphql (1)
- # klipse (2)
- # leiningen (5)
- # lumo (15)
- # off-topic (1)
- # om (3)
- # om-next (3)
- # re-frame (19)
- # reagent (7)
- # test-check (1)
- # uncomplicate (2)
- # yada (8)
I'm getting an error when using clj with a deps.edn including a :local/root.
{:deps {org.clojure/java.jdbc {:mvn/version "0.6.2-alpha2"}
oracle/driver {:local/root "./ojdbc7.jar"}}}
It says
Error building classpath. Wrong number of args (4) passed to: local/eval398/fn--400
Based on that error, it’s probably a bug based on one of the recent refactors. I will take a look. Also btw, this stuff is good for #tools-deps
yep, had some signature drift. will be fixed in next release.
as a temp workaround, you can probably declare it in paths instead -
:paths ["src" "ojdbc7.jar"]
that’s not what paths is for, but it should work
Thanks.
Based on "Refer to a specific jar on disk" in https://clojure.org/guides/deps_and_cli
I also tried full path etc.
(Also interested in how to debug stuff like this.)
Answering my own question in part. clj -Sverbose
will show details. In my case confirming my brew install wasn't the latest. (not a fix but still useful).
is there a simple way to do a https supporting web server in java? it feels silly that my clojure code is all doing http/ws, then I am running some node.js wrapper to tunnel https -> http, wss -> ws
@U3JURM9B6 have you seen this? http://www.luminusweb.net/docs/deployment.md#setting_up_ssl
I personally just deploy to Elastic Beanstalk, which takes care of SSL and Nginx for me
some auth libs I'm talking to are unhappy unless the host url is ssl, thus, I need ssl even in my dev setup
I see, then yes I think Immutant is the way to go: http://immutant.org/documentation/current/apidoc/guide-web.html#h3374
there are more reasons to use nginx as a reverse proxy - it has better security and more reliable security updates than most alternatives, and if set up properly can improve performance and balance your load for you
as stupid as it sounds, neither performance nor load balancing matters for production, I'm using AWS for SSL this is literally for local, where there is just one user (me), and I need SSL because some auth libraries I'm playing with barf if my webpage isn't hosted in SSL
oh - aws might be using nginx for your ssl for all I know (I know that is how it works for our app at least)
have you tried to spin up a nginx docker container and proxying requests to your local server? This is probably more than what you need, but you could use as reference to create your own config. https://github.com/jwilder/nginx-proxy
i'm a clojure newbie and am trying to learn channels and agents. Did a small tutorial about them here: https://joaoptrindade.com/tutorial-clojure-agents-and-channels anyone interested in giving some feedback? see if i understood the concept correctly
buddy includes that sort of thing https://funcool.github.io/buddy-core/latest/#hmac
when creating a restful api using ring + compojure, do I have to specify {:body ..}
for every single handler? Is it not possible to make this automatic
this is what I mean:
(defn index-page [req]
{:body {:data [{:id 1
:name "Some name"}]}})
(defroutes app-routes
(GET "/" _ index-page))
how can I make an http call in ring and return the result to the client? when I do this
(defn get-orders [req]
(let [{:keys [sig uri]} (api-signature :get-orders)]
(client/get uri
{:async? true}
(fn [response] {:body "something"})
(fn [exception] {:body "error"}))))
it gives me this error
No implementation of method: :render of protocol: #'compojure.response/Renderable found for class: org.apache.http.impl.nio.client.FutureWrapper
@bravilogy you're making an async get
call inside a synchronous handler.
You could use Ring's async handler machinery -- or force a dereference on the get
call -- or just do a synchronous get
instead.
thanks @seancorfield. Actually I removed :async? true
along with callbacks and it works fine now
If you were using Ring's async handlers, it would make sense to use the async version of get
-- and, yes, async would not block while the HTTP call is processed.