This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-15
Channels
- # alda (1)
- # beginners (24)
- # biff (9)
- # calva (55)
- # cherry (1)
- # clj-kondo (36)
- # cljs-dev (3)
- # clojure (37)
- # clojure-austin (2)
- # clojure-brasil (1)
- # clojure-europe (14)
- # clojure-nl (1)
- # clojure-norway (24)
- # clojure-spec (3)
- # clojure-uk (1)
- # community-development (6)
- # core-typed (1)
- # datalevin (5)
- # datomic (28)
- # emacs (14)
- # events (1)
- # gratitude (9)
- # hyperfiddle (27)
- # instaparse (3)
- # joker (16)
- # lsp (89)
- # malli (24)
- # missionary (2)
- # nbb (5)
- # off-topic (59)
- # re-frame (12)
- # reitit (17)
- # releases (4)
- # sci (14)
- # spacemacs (1)
- # squint (7)
- # xtdb (41)
Is there any reason for config.edn
or secrets.env
to not get loaded? When I print my ctx
the corresponding values are just the env variable names (e.g. “COOKIE_SECRET” instead of $COOKIE_SECRET
)
it's a feature, not a bug 🙂. secrets are intentionally kept out of ctx
so that it's harder to shoot yourself in the foot by accidentally printing out all your secrets/serializing them somewhere. instead, secrets are stored in environment variables by default, and there's a helper function (stored in ctx
) that can read them for you:
(defn my-handler [{:keys [biff/secret]}]
(println (secret :biff.middleware/cookie-secret))
...
another benefit of having this extra layer of indirection is that you can override the secret
fn implementation if you're using something other than env variables to store your secrets. it's also compatible with loading the secrets only when you use them at runtime instead of loading them all at system startup.I.e. the values from config.edn are only ever used to provide the names of the corresponding env vars
the main reason I wanted to bake this into biff (instead of letting people just update their codebases if they switch away from env vars) is that the biff library code needs to read secrets, so I wanted it to have some kind of stable interface for doing so that wouldn't need to change
has anyone set up Lucene for full text search with biff? It looks relatively simple from the xtdb set up section but it never seems like things go that smoothly 😛 Im using xtdb with postgres on DO
haven't done it myself, but good luck 🙂 happy to help troubleshoot if you run into any problems
Hi @U0CKDV6DB, I setup full text search with biff using the following Update deps.edn add the following line.
com.xtdb/xtdb-lucene {:mvn/version "1.23.3"}
Update config.edn add the following line
:biff.xtdb/opts
{:xtdb.lucene/lucene-store {}}
See the line 35 and 36 on the attached screenshot.