Environment variables
okal opened this issue · comments
I'd like to make some server environment variables available to CLJS, through something like environ
. Does cljx enable this sort of functionality?
No. Depending on when you're compiling your ClojureScript, that's something you'll want to splice into your CLJS source via a macro, or make available in your JS runtime explicitly (e.g. always load something like "window.__environment = {…}"
first, and refer to it in your ClojureScript via js/window.__environment
).
Thanks. Wound up using a macro.