This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-28
Channels
- # announcements (19)
- # aws (4)
- # babashka (17)
- # beginners (74)
- # biff (2)
- # calva (5)
- # cider (6)
- # clerk (14)
- # clj-kondo (12)
- # cljs-dev (3)
- # clojure (40)
- # clojure-dev (26)
- # clojure-europe (28)
- # clojure-nl (1)
- # clojure-norway (39)
- # clojure-sweden (1)
- # clojure-uk (4)
- # conjure (2)
- # docker (35)
- # emacs (24)
- # graalvm (15)
- # graphql (1)
- # gratitude (4)
- # holy-lambda (2)
- # hyperfiddle (8)
- # introduce-yourself (3)
- # jobs (3)
- # nrepl (2)
- # off-topic (9)
- # pedestal (8)
- # reitit (5)
- # releases (3)
- # remote-jobs (3)
- # yamlscript (1)
I just pushed 0.7.0-beta-3. Not bothering with a formal release announcement, but this includes the fixes to the specs so that they operate in the correct namespace, and a few tweaks to the code that helps with writing responses.
I know that specs aren't for a fully precise description of the functions
but
https://github.com/pedestal/pedestal/blob/0.7.0-beta-3/service/src/io/pedestal/http/specs.clj
::http/service-map
Has ::http/port
as required and ::http/routes
as optional, and is used in http/create-servlet
:args spec
using this form:
(require '[io.pedestal.http :as http]
'[io.pedestal.test :refer [response-for]])
(let [{::http/keys [service-fn]} (http/create-servlet {::http/port 3333
#_#_::http/routes #{}})]
(response-for service-fn :get "/"))
we can see that
• ::http/routes is required
• ::http/port is not required
The same for http/create-server
. And more. You define ::http/port as a pos-int?, that exclude 0, that is a valid value (it takes a "random availble port", in jetty, not sure other engines).Much of this is not the way I would have liked to see it set up on day 1, but I wasn't here on day 1.