Hello folks, I want to use the UntangledApiHandler from the Untangled Server. I have read the source code about the untangled-system, but I don't understand the modules passed in to that function. Can anyone help me understand the code?
What's the purpose of the :ui/react-key
? Is it mostly to allow forcing a refresh of the entire UI?
yep, as far as I know π
How is that usually done? (merge! reconciler {:ui/react-key "some-key"})
?
@danielstockton Tony Kay explains it in his video series here (I linked the correct time in the video as well :)): https://youtu.be/vzIrgR9iXOw?t=9m27s
Oh, thanks!
I found the modular-server branch on the untangled-template github page :aw_yeah:
@adambros Yes, I've managed to find the answer by digging through the source. I missed the documentation on the develop branch π, but that does clear things up. I am currently wrapping our existing system with the untangled-system. I defined two modules with ApiHandlers to parse incoming requests based on the environment. How are you folks using it?
essentially it provides a middleware fn that looks at the request url and decides whether it should serve up an image, or continue along
but itβs done as an ApiHandler so that the consumer of it decides where to place the image-library middleware
oh and it also provides read and mutate endpoints on top of that, which is determined by where itβs located in the :modules vector
this was essentially the library that sparked the need for better/simpler ways to control your middleware and install library reads and mutates
Oh nice π
I do not see an obvious problem with the code.
are you sure you've loaded the file that contains your mutation?
dynamic language
won't run a multimethod instance if it isn't loaded
@eric.shao you may want double check if your browser cache is deactivated, I had lost some hours in the past trying to debug something that ended up being just caching...
Ah yes, that is a good tip too
fatihict: did you end up finding the answer to your question?
I wrote documentation here https://github.com/untangled-web/untangled-server/blob/develop/README.adoc#22-the-simple-way
Looks like part of the problem is that for untangled server the default branch is master
ooops. Fixed. It is now develop