Hi, I would like to use Datomic Cloud but I am having a hard time trying to figure out or (work out) how to create a web application that has routing. All the web applications I have created with Clojure just run after calling main and then accept http requests. These kind of web applications have no invokable function unlike what is suggested with Datomic Ions. How do I write a web application using routing libraries like bidi while exposing an invokable function via :http-direct
? Thanks in advance for your answers.
I didn't know that you can just pass the handler as the invokable function to :http-direct
. Thanks 👍.
You can put the router in the ion that’s being invoked via :http-direct
.
Treat the ion like you would main
.