have the http-kit instance returned as an HttpServer instance

this is more flexible, allowing a few http-kit functions to be called
against it (including one to stop http-kit), versus the alternate
return type which is just a simple function that can be called to stop
http-kit

this is ALSO what i thought i had done already, thus why the stop
function found below in this very same defstate is written to call
`http-kit/server-stop!` which won't actually work without setting
legacy-return-value? to false. oopsie! :-)
This commit is contained in:
Gered 2022-01-05 18:01:43 -05:00
parent f7dbd17c89
commit aa1aa76bbf

View file

@ -171,7 +171,8 @@
(wrap-base #'handler)
{:port port
:ip bind
:server-header nil})]
:server-header nil
:legacy-return-value? false})]
(log/info (format "Started HTTP server listening on %s:%d" bind port))
server)
:stop