datomic

Ask questions on the official Q&A site at https://ask.datomic.com!
cjsauer 2020-08-23T02:43:48.057500Z

The ion wraps (or adapts) the handler function. So for example, if you’re using bidi, then the handler that you get when you call bidi.ring/make-handler can be configured as an invokable function. This is thanks to http ions being “ring compatible” as per the docs. In the main function that you’re used to, you probably have been starting an http server (eg jetty) by passing it your handler function. With ions, you don’t run the http server yourself. This is abstracted away by API Gateway. All you have to do is define your handler function and configure it properly as an http direct endpoint.

cjsauer 2020-08-23T02:48:44.059500Z

The gist is that, from this example in bidi’s readme, app is just a function (http request -> response). That is your invokable function. https://github.com/juxt/bidi#wrapping-as-a-ring-handler

Kevin Mungai 2020-08-23T14:18:50.061400Z

Thanks 👍. Datomic Cloud keeps looking better and better.