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.
The gist is that, from this example in bidi’s readme,
app is just a function (http request -> response). That is your invokable function.
I didn't know that you can just pass the handler as the invokable function to
:http-direct. Thanks 👍.
Thanks 👍. Datomic Cloud keeps looking better and better.