Fork me on GitHub
#pedestal
<
2019-05-10
>
souenzzo00:05:34

@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])

wei07:05:38

@souenzzo thanks! and how does that file path get associated with a URL route to serve it? sorry, fairly new to pedestal

wei07:05:23

or alternatively, if there's a link to a complete example that'd be great

souenzzo13:05:00

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.

🙏 4
👍 4
ddeaguiar13:05:24

@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.

🙏 4
👍 4
jmv16:05:01

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?

asilverman17:05:38

#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?

donaldball17:05:44

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

asilverman17:05:32

What should I set the ::http/port value to?

asilverman20:05:28

hey, I actually hadn’t configured the ::http/host, once I set it to 0.0.0.0 things got going again. Thanks for the help