@wei
::http/file-path "target/public"
<< files not in your classpath
::http/resource-path "public"
<< files in your classpath
::http/mime-types mime/default-mime-types
<< useful (require '[ring.util.mime-type :as mime])
@souenzzo thanks! and how does that file path get associated with a URL route to serve it? sorry, fairly new to pedestal
or alternatively, if there's a link to a complete example that'd be great
Using ::http/resource-path "public"
with :paths ["src" "resources"]
(in deps.edn) or :resource-path ["resources"]
(in project.clj)
resources/public/app.html
will be available in :8080/app.html
I think that it first try to find a file, then try to find a route in your router.
@souenzzo is correct (thanks!), here are some more details. When default interceptors are added, if the ::http/resource-path
is present in the service map, then an interceptor wrapping the ring resource
middleware is conjโd onto the interceptor chain. This interceptor executes itโs :enter
impl prior to routing.
hi all, i've been playing around with vase and i'm wondering if there's a way for the pedestal service to reload the configuration if i change a dynamic interceptor in the fern file. e.g., i realize there is an error with my query and i want to fix it. can i do that and have the change take effect without having to stop and start vase?
#pedestal , Hi everyone. I tried to bump the version of io.pedestal/pedestal.service
in my project from 0.5.3 -> 0.5.4 and my service stops responding to requests on the SSL port. Anyone has any clues what could be causing this?
yes, I believe it was that version that introduced a new behavior whereby the ssl port listener also now binds to an explicit ip address
Yeah, itโs called out here as a breaking change: https://github.com/pedestal/pedestal/blob/master/CHANGELOG.md#054---june-29-2018
What should I set the ::http/port value to?