I wanted to create a library that allows to use known Clojure tools to develop API's on AWS Lambda.
A library that
This is why holy-lambda-ring-adapter was released. An adapter is a part of holy-lambda project and is already used in production.
With plain ring
(ns core
(:require
[fierycod.holy-lambda-ring-adapter.core :as hlra]
[fierycod.holy-lambda.core :as h])
(defn ring-handler
[request]
{:status 200
:headers {}
:body \"Hello World\"}
(def HttpApiProxyGateway (hlra/ring<->hl-middleware ring-handler))
(h/entrypoint [#'HttpApiProxyGateway])
With Reitit & Muuntaja reitit
(ns core
(:require
[fierycod.holy-lambda-ring-adapter.core :as hlra]
[fierycod.holy-lambda.core :as h])
(def muuntaja-ring-handler
(ring/ring-handler
(ring/router
routes
{:data {:muuntaja instance
:coercion coerction
:middleware middlewares}})))
(def HttpApiProxyGateway (hlra/ring<->hl-middleware muuntaja-ring-handler))
(h/entrypoint [#'HttpApiProxyGateway])
The holy-lambda documentation is available here.
Copyright © 2021 Karol Wojcik aka Fierycod
Released under the MIT license.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close