Fork me on GitHub
#ldnclj
<
2016-01-08
>
agile_geek07:01:36

Morning London ppl. I'm thinking hard about what I'm doing after contract finishes in Feb. A number of options, but nothing that pays atm!

davesnowdon10:01:27

Newbie question: I need to build a RESTful API using clojure and am wondering what library to start with as I've done very little web server dev with clojure. I've seen mention of people using pedastal and compojure-api, and Malcolm Spark's yada looks interesting. Any recommendations on which to try first? I don't need to serve any pages or static content. I need to support adding security headers (CORS, HSTS) and also need to handle file uploads. OAuth2 support is also required.

thomas10:01:18

@davesnowdon: in that case Yada might be a good lib... not sure though how good is for a newbie.

thomas10:01:36

ask over in the yada channel what people think.

thomas10:01:18

ooh and watch the talks that Malcolm has given on yada (The one from ClojureEx I am in as well actually)

davesnowdon11:01:16

thanks @thomas . I hadn't spotted there was a yada channel

mccraigmccraig11:01:59

@davesnowdon: yada is worth a play with - though i don't know about OAuth2 support - yada uses aleph which is as ring compatible as it can be given that it's responses are promises (well, manifold Deferreds), but if your OAuth2 impl of choice is a ring handler which modifies response it probably won't work without some patching

davesnowdon11:01:19

thanks @mccraigmccraig - I haven't settled on an OAuth2 implementation yet

mccraigmccraig11:01:13

i'm using buddy's JWS tokens for auth with yada - https://funcool.github.io/buddy-auth/latest/#jws-token - but i have full control of the client, so i get to choose