Fork me on GitHub
#beginners
<
2022-04-17
>
Prometheus18:04:19

Tip for beginners. If you have running repl and want to test a function in your namespace you can write a (comment ...) form directly in the namespace and place a function call in there and eval the expression. This saves on copying and pasting to and from the repl, and you get the added benefit of some documentation for the expected usage of the function.

1
👆 2
1
manas_marthi03:04:06

Add a comma at the end (comma .... ,) it helps with unwanted paredits as per @U04V70XH6

seancorfield04:04:44

That doesn't work with recent Calva versions BTW. I use a period now: .)

gratitude 2
Filip Strajnar20:04:23

Is there a tool that'd generate OpenAPI spec for me from looking at code? This way i could serve SwaggerUI

Filip Strajnar20:04:45

Kinda like OpenAPI and http://ASP.NET Core do

Filip Strajnar21:04:02

also, if anyone would be kind enough to point me to any resource for developing REST API with clojure, that'd be greatly appreciated :)

lispyclouds21:04:03

Can check out: • https://github.com/seancorfield/usermanager-example • https://github.com/prestancedesign/usermanager-reitit-example 2 examples of similar ideas but using different tooling in clojure

✅ 1
🙌 2
seancorfield22:04:59

Neither of those present a REST API (yet -- it's on my list), but I'd point you at Compojure, Compojure-API, or Liberator depending on exactly how "REST" you need to be, whether you want Swagger support, etc and how much complexity you're willing to learn/bear.

Ted Ciafardini02:04:23

First time seeing this - thanks Sean gratitude

radu04:04:38

Have a look at Jacek’s reitit course https://www.jacekschae.com/learn-reitit-pro It costs a little money, but it will show you - step by step - how to build an API server, with swagger, content negotiation etc.

dorab17:04:02

For server side, take a look at https://github.com/juxt/yada , https://github.com/juxt/apex and its use in https://github.com/juxt/site . On the client side, take a look at https://github.com/oliyh/martian