Fork me on GitHub
#re-frame
<
2018-06-29
>
chadhs00:06:25

I’m not sure what I’m missing I want to call the http://darksky.net api which doesn’t allow CORS so I setup a simple ring+compojure server that serves up my re-frame apps index.html as well as a /weather endpoint that calls darksky. However even updating my reframe event to call http:/localhost:3000/weather I still get no response. Hitting that endpoint in the browser I get the json response. Here’s my WIP PR https://github.com/chadhs/ccclock/pull/13/files

chadhs20:06:27

figured it out, i had to enable CORS on my ring proxy

{:status 200
 :headers {"Access-Control-Allow-Origin" "*"
           "Access-Control-Allow-Headers" "Content-Type"
           "Content-Type" "application/json"}
 :body (get result :body)}

aaelony05:06:35

@danielcompton - I want to have a re-frame app be able to derive views by reading from Markdown files in the resources/public directory and translating markdown to hiccup. Would this course cover that as well? If so,

juhoteperi05:06:48

@aaelony The course doesn't use re-frame nor markdown. You can get good idea of the contents from the free part of the course: https://www.jacekschae.com/learn-reagent-free

juhoteperi05:06:18

For converting markdown to hiccup, on JVM you can use https://github.com/theJohnnyBrown/endophile

aaelony05:06:29

oh - I just meant slurping a file from clojure and being able to process it into hiccup that becomes the view in cljs

aaelony05:06:55

checking the free version now, actually. Pretty nice so far!

aaelony05:06:36

(and this is a re-frame channel, so... :)