Fork me on GitHub
#reitit
<
2021-07-25
>
Michaël Salihi20:07:38

@chris.paul This is a typical use case when a reloaded workflow is useful. Here you can find an setup repo with Reitit and Integrant: https://github.com/prestancedesign/usermanager-reitit-example LMK if you have any questions.

zxspectrr21:07:40

it's similar to my setup. However say I made a change to function in a controller namespace, I find that I have to reload botht he controller namespace and the caller namespace (handler)

Michaël Salihi20:07:22

Did you use any following "reloaded workflow" tools? • Integrant • Component • Mount • Clip Take a look at this post https://www.cognitect.com/blog/2013/06/04/clojure-workflow-reloaded

Michaël Salihi20:07:46

FYI my example project above use Integrant and handle the namespace with a simple Emacs keyboard shortcut.

zxspectrr10:07:15

yea i use cursive and integrant

zxspectrr10:07:32

i can reload files to the repl, i was trying to avoid having ti reload multiple files, just the one that i have changed

zxspectrr10:07:00

but i think due to how routes are configured, you have to refresh the route definition (the caller) as well as the file that you've modified

rafaeldelboni23:07:04

Hey hello good night In using using reitit+pedestal and I need to "store" the raw body to do later on in some routes I want to do a https://discord.com/developers/docs/interactions/slash-commands#security-and-authorization I'm doing this https://github.com/rafaeldelboni/super-dice-roll-clj/blob/main/src/parenthesin/components/router.clj#L52-L58, but I suspect this is leading to memory leaks, because not all routes slurps this raw-body, then I added https://github.com/rafaeldelboni/super-dice-roll-clj/blob/main/src/parenthesin/components/router.clj#L60-L65 to ensure that this new body will be always slurped, but I'm not sure if my memory leak problem if fixed. Anyways, is there an official/better way to do this?