This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-17
Channels
- # aleph (3)
- # announcements (12)
- # beginners (80)
- # boot (3)
- # braveandtrue (16)
- # calva (3)
- # cider (82)
- # clojure (100)
- # clojure-art (3)
- # clojure-dev (79)
- # clojure-estonia (1)
- # clojure-europe (4)
- # clojure-finland (15)
- # clojure-indonesia (1)
- # clojure-italy (20)
- # clojure-nl (4)
- # clojure-spec (24)
- # clojure-sweden (2)
- # clojure-switzerland (1)
- # clojure-uk (99)
- # clojurescript (145)
- # cursive (8)
- # data-science (7)
- # datomic (26)
- # emacs (4)
- # figwheel-main (20)
- # fulcro (8)
- # graphql (3)
- # hoplon (2)
- # jobs (1)
- # kaocha (5)
- # leiningen (2)
- # liberator (19)
- # off-topic (16)
- # pathom (9)
- # perun (1)
- # portkey (2)
- # re-frame (17)
- # reitit (1)
- # shadow-cljs (26)
- # spacemacs (7)
- # vim (49)
Don’t use easy server…really. It is very simple to roll your own. The new template sets it all up for you.
@mss i think that it's underdocumented
CLJS
- When you create new-fulcro-client
, you can pass (fc/new-fulcro-client :networking (net/fulcro-http-remote {:url "//localhost:8080/api"}))
CLJ
- Create a pedestal webserver in 8080
- create a route in POST/api
. It should read and write transit
- you can take all (parsed) body from /api
and pass to your parser {:body (edn->transit (my-parser/parser {:my-db {...}} body)) :status 200}
pedestal or any ring'ie.
I know nothing about "fulcro server". Maybe can be easier use fulcro server and just exchange the parser
part.
figured it out after a little tinkering — didn’t realize I needed to roll my own handler vs using the fulcro one out of the box. appreciate the help!
@mss
from lein new fulcro my-project
inside src/main/my_project/server_components/middleware.clj
just remove (def server-parser (server/fulcro-parser))
And use (def server-parser (p/parser {.. pathom stuff ..}))
it should be way easier then create a new webserver... And should keep debug/support easier 🙂
I’ve asked this same question myself. Thanks for this clear answer @souenzzo