This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-02
Channels
- # adventofcode (76)
- # announcements (1)
- # asami (1)
- # babashka (31)
- # beginners (302)
- # calva (3)
- # cider (1)
- # clj-kondo (1)
- # cljdoc (1)
- # cljfx (63)
- # cljsjs (2)
- # clojure (36)
- # clojure-europe (29)
- # clojure-gamedev (2)
- # clojure-nl (5)
- # clojure-sanfrancisco (2)
- # clojure-spec (2)
- # clojure-uk (71)
- # clojurescript (19)
- # conjure (21)
- # core-async (10)
- # core-matrix (1)
- # cryogen (4)
- # cursive (12)
- # datomic (22)
- # emacs (4)
- # events (1)
- # figwheel-main (7)
- # fulcro (9)
- # graalvm (1)
- # jobs (1)
- # kaocha (17)
- # lambdaisland (1)
- # meander (7)
- # mount (2)
- # nrepl (12)
- # off-topic (35)
- # re-frame (15)
- # reagent (17)
- # remote-jobs (1)
- # reveal (41)
- # shadow-cljs (13)
- # spacemacs (2)
- # tools-deps (24)
Hi everyone, I was wondering how to best approach the following project setup: I would like to have one monorepo that contains client and server. I fire up figwheel and a repl for my backend and I can ask my server for an index.html and I get my client together with figwheel. Is this doable without hours spent in documentation? Is it just too complicated and it's faster to just have two repos and configure my client so it can talk to a decoupled server?
It's definitely possible. There likely exist better examples, but one of my projects does exactly that https://gitlab.com/jan_k/doomlist
Check out these docs https://figwheel.org/docs/your_own_server.html
The flip side is also pretty straightforward. Figwheel generates static files, and it supports CORS requests nicely. so you can launch Figwheel in the background, and have your server (Pedestal + Protojure gRPC server in my case, but anything will work) server the index.html and JS files from target/public
.
your site loads from your server, and then it connects to Figwheel on a different port for live updates.