This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-23
Channels
- # announcements (2)
- # architecture (16)
- # babashka (26)
- # beginners (106)
- # calva (173)
- # chlorine-clover (19)
- # cider (36)
- # cljdoc (4)
- # clojure (113)
- # clojure-berlin (3)
- # clojure-czech (3)
- # clojure-dev (5)
- # clojure-europe (37)
- # clojure-france (3)
- # clojure-hamburg (12)
- # clojure-italy (4)
- # clojure-nl (2)
- # clojure-uk (22)
- # clojurescript (38)
- # cryogen (10)
- # cursive (30)
- # data-science (7)
- # datascript (1)
- # datomic (13)
- # deps-new (7)
- # depstar (13)
- # duct (3)
- # events (2)
- # exercism (3)
- # fulcro (31)
- # graalvm (56)
- # graphql (1)
- # helix (5)
- # java (12)
- # jobs-discuss (19)
- # kaocha (13)
- # luminus (1)
- # lumo (4)
- # malli (5)
- # off-topic (17)
- # parinfer (1)
- # pathom (1)
- # pedestal (7)
- # rdf (10)
- # re-frame (1)
- # remote-jobs (7)
- # rum (6)
- # shadow-cljs (4)
- # tools-deps (41)
- # uncomplicate (3)
- # vim (14)
How are admin endpoints handled in pedestal? I am used to exposing theese endpoints on a different port than the "public facing api".
Does anyone have an example? E.g I want to expose port 5000 for admin-endpoints (health/metrics) and 8080 for my "regular api".
I guess it depends on which web-server is used also..
In e.g Jetty", this is possible with multiple connectors
@jarvinenemil i do that in 2 ways:
- I have multiple instances of pedestal. My current app has 4 different ports/instances.
- I gave up default-interceptors
. Now I have a custom interceptors set where things like sessions
and csrf-token
are after the routing (to it can be applied just for some routes)
so pedestal starts several web-servers? or can it re-use the same instance? 😄
If you really want to do it on a different port, I think you need more than one service-map that is http/started
. If it were me though, I would just use an /admin
"route folder", where all the routes get an interceptor added that ensures admin access. (But I don't have an example app to show)