This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-31
Channels
- # announcements (7)
- # asami (2)
- # babashka (47)
- # beginners (8)
- # calva (42)
- # clj-kondo (58)
- # cljdoc (1)
- # clojure (88)
- # clojure-europe (11)
- # clojurescript (6)
- # conjure (7)
- # data-science (5)
- # emacs (9)
- # events (1)
- # holy-lambda (3)
- # introduce-yourself (5)
- # meander (3)
- # missionary (4)
- # nbb (18)
- # obb (5)
- # off-topic (1)
- # other-languages (10)
- # pathom (2)
- # reagent (6)
- # releases (3)
- # ring (3)
- # scittle (1)
- # shadow-cljs (1)
- # spacemacs (2)
- # xtdb (6)
putting my next question in the relevant channel: this doesn't seem to work for nbb? https://clojurians.slack.com/archives/CLX41ASCS/p1659286512703779
oh wait, this might be due to the way that downloading and unzipping deps doesn't work with git deps
but I also want to include spec into bb/nbb anyways, so having a dedicated config for it in sci.configs would be good too
Exploring setting up ring-like handlers with express and using file based routing similar to remix. In simple cases, what I have works but I think if I ran into a situation where the intended route was something like api/some/data.json
the ns might be incompatible as myproject.backend.routes.api.some.data\..json
is probably not valid. Maybe it can be setup to load the file via filepath vs classpath then introspect the exposed api functions?
https://github.com/eccentric-j/gracieanimator/blob/main/src/framework/server/router.cljs
the tl;dr impl now is that it uses like scandir api to read the files in the routes directory, loads them dynamically, then transforms the filepath into a class name to get the exposed handler type functions
But if the intended route contains a literal .
, I'm not sure there's a way to get that into a classpath without it causing problems
Hmm maybe the answer is simple: Where there's literal chars that are incompatible with a classpath the file\classpath could be myproject.backend.routes.api.some.data$dot$json
. Might have to study up on valid classpath chars to pick a better option, but something like that would solve the problem, though it's not very intuitive