borkdude/quickblog

Replace workaround that copies metadata from `api/serve`

ljpengelen opened this issue · 0 comments

https://github.com/borkdude/quickblog/blob/main/src/quickblog/cli.clj contains the following comment:

;; api/serve returns immediately, so we'll wait on a promise
;; after calling it to prevent the process from exiting. In
;; order for the help text to work, we need to grab the metadata
;; from the api/serve var and attach it to our fn. This is
;; admittedly gross and I should be scolded severely for this
;; nonsense. Send a pull request along the scolding, if you
;; don't mind!

#57 proposes an alternative implementation of serve that doesn't require the copying of metadata from serve to the nameless function that blocks.