Fork me on GitHub

putting my next question in the relevant channel: this doesn't seem to work for nbb?


oh wait, this might be due to the way that downloading and unzipping deps doesn't work with git deps facepalm


I don't think that spec fork work with nbb, at least I haven't tested it


but we could maybe make it so


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


that could also be true. I still believe that git deps aren't working right


nvm, it does

eccentric J19:07:06

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\..json is probably not valid. Maybe it can be setup to load the file via filepath vs classpath then introspect the exposed api functions?

eccentric J19:07:22

My route handling code

👍 1
eccentric J19:07:18

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

👍 1
eccentric J19:07:05

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

eccentric J19:07:15

Hmm maybe the answer is simple: Where there's literal chars that are incompatible with a classpath the file\classpath could be$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


I wouldn't use $ on file paths since $ has special meaning in CLJS in :require

eccentric J19:07:59

Oh right, that makes sense


Clojure has munge :

(munge 'data->json)
Perhaps something similar but .: __DOT__?

eccentric J19:07:14

Yeah exactly! I didn't know about munge though, that's really helpful