This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-14
Channels
- # aws (1)
- # beginners (52)
- # boot (1)
- # cider (9)
- # clara (4)
- # cljs-dev (40)
- # cljsrn (2)
- # clojure (166)
- # clojure-dusseldorf (1)
- # clojure-italy (38)
- # clojure-spec (13)
- # clojure-uk (32)
- # clojurescript (337)
- # cursive (11)
- # data-science (47)
- # datomic (11)
- # emacs (3)
- # events (1)
- # fulcro (57)
- # hoplon (16)
- # jobs-discuss (1)
- # juxt (11)
- # keechma (21)
- # mount (2)
- # off-topic (44)
- # onyx (9)
- # re-frame (33)
- # reagent (1)
- # ring-swagger (3)
- # specter (2)
- # test-check (37)
- # vim (30)
@flyboarder I am still stuck on setting the environment variables for Firebase. You told me to use adzerk-oss/env
, but more specifically, how? what are best practices?
I have tried in a .clj
file:
(env/def
FIREBASE_API_KEY "aaa"
FIREBASE_AUTH_DOMAIN "bbb"
FIREBASE_DATABASE_URL "ccc"
FIREBASE_STORAGE_BUCKET "ddd")
and.. (alter-var-root #'FIREBASE_API_KEY (constantly "aaa"))
(alter-var-root #'FIREBASE_AUTH_DOMAIN (constantly "bbb"))
(alter-var-root #'FIREBASE_DATABASE_URL (constantly "ccc"))
(alter-var-root #'FIREBASE_STORAGE_BUCKET (constantly "ddd"))
But I keep getting error: Required env vars: [FIREBASE_API_KEY FIREBASE_AUTH_DOMAIN FIREBASE_DATABASE_URL FIREBASE_STORAGE_BUCKET]
In a previous version of hoplon.firebase I just used (fb/init)
in a .cljs
file like: (fb/init
{ :apiKey "aaa"
:authDomain "bbb"
:databaseURL "ccc"
:storageBucket "ddd"})
Should I even be trying to set these from my source code? or in my general Windows/Java config? Where? Thanks!@chromalchemy from terminal
FIREBASE_API_KEY=XXXXXXXXXX FIREBASE_AUTH_DOMAIN=
the idea behind adzerk/env is that there are no config files
Oh. Are those vars set persistantly? or do you have to re-enter them on every terminal session?
you could set them to your env i guess, I personally rely on terminal history and good old copy paste 😉
but then in testing or on CI you set them as env vars
like on travis or something
so you only have to update the env vars if the config changes
Ok, It's working now:joy:. I fumbled with entering the vars individually, and before boot develop
. But I see now that it must all be entered together
With firebase.hoplon
https://github.com/hoplon/brew/blob/master/src/hoplon/firebase.cljs I am only using (fb-cell)
What is the general use-case of the other cell functions? I do not understand the prase "Returns a formula cell unbound to the Firebase Reference..."
it's also worth knowing that you can set adzerk/env vars from the REPL with e.g. (System/setProperty "SOME_VAR" "foobar123")
it works because when you declare env vars with env/def it looks for system properties (jvm global name->string mapping) in addition to environment variables (per-process unix kind)
the System/setProperty way is also how you can set them in your build.boot if you want
@chromalchemy unbound means it will not receive updates if the db changes directly, bound means that it's 2-way binding from cell to db
I.e. Unbound only load once or when they make changes to the DB, you'll need to refresh to see other changes, this is good for loading things once, instead of continuously watching for changes