datomic

Ask questions on the official Q&A site at https://ask.datomic.com!
Kevin Mungai 2020-08-22T10:44:58.046700Z

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.

Kevin Mungai 2020-08-23T14:17:41.060Z

I didn't know that you can just pass the handler as the invokable function to :http-direct. Thanks 👍.

jdhollis 2020-08-22T18:20:26.047800Z

You can put the router in the ion that’s being invoked via :http-direct.

jdhollis 2020-08-22T18:22:02.048600Z

Treat the ion like you would main.