Fork me on GitHub

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)