This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-30
Channels
- # babashka (1)
- # beginners (86)
- # boot (5)
- # calva (21)
- # cider (26)
- # clj-kondo (10)
- # cljs-dev (5)
- # cljsrn (3)
- # clojure (181)
- # clojure-europe (22)
- # clojure-germany (11)
- # clojure-italy (3)
- # clojure-nl (7)
- # clojure-spec (6)
- # clojure-sweden (6)
- # clojure-uk (65)
- # clojuredesign-podcast (1)
- # clojurescript (71)
- # core-logic (2)
- # cryogen (15)
- # data-science (9)
- # datomic (7)
- # duct (4)
- # emacs (4)
- # events (1)
- # exercism (1)
- # fulcro (136)
- # funcool (1)
- # joker (6)
- # kaocha (3)
- # lambdaisland (28)
- # lumo (3)
- # malli (5)
- # mount (1)
- # off-topic (13)
- # re-frame (14)
- # ring (10)
- # shadow-cljs (20)
- # sql (5)
- # tools-deps (5)
- # tree-sitter (1)
- # uncomplicate (9)
how would one set some code from the http-server that is "injected" into my cljs-code? in my case I want to set an url to a server depending on which server my cljs-code is running from. like so:
server hosting cljs rest api server
localhost localhost:1234
right now I use ring and just serve static files. was thinking that maybe one could modify something in the files when ring sends the static files@saikyun Maybe use Selmer to have mostly static templates with a few variables substituted?
@seancorfield thanks for the tip! I'll check it out 🙂 definitely seems to do what I want to do 🙂
We use Selmer very heavily at work to generate HTML pages from templates and data.
cool 🙂 did I understand Selmer correctly, that it doesn't re-generate html pages if the data hasn't changed?
It precompiles the templates (if I recall correctly), but it still generates the HTML each time -- but it's fast. We serve millions of pages a day with it.
(we use it to generate all the emails we send, as well as all the HTML pages we generate from several apps)