Fork me on GitHub
#ring
<
2016-04-12
>
fenton01:04:44

Is there a ring handler that can deal with deep linking? Meaning, basically, if a file is requested that doesn't exist, return a default file.

fenton01:04:05

found it... just check if file exists, if not just return the index.html file.

zane22:04:22

With Ring how common is it to attach application-specific things to the request / response maps?

zane22:04:53

For instance, is it normal to attach a Datomic database connection to the request map in middleware so your handler can pull it off later?

nberger23:04:35

I think so, I use to do that

weavejester23:04:58

zane: I’d instead use a closure. So more like: (fn [conn] (fn [request] response))

zane23:04:55

@weavejester: Yeah, I'm using partial at the moment for the database connection. 👍