I wonder is there any mechanism to implement live reload in case one develops REST API?
As an example, consider the following code, which is defined in file “server.jl”
using HTTP function hello(r) return HTTP.Response(200, "Hello") end const ROUTER = HTTP.Router() HTTP.@register(ROUTER, "GET", "", hello) HTTP.serve(ROUTER)
Now, if I start this server with
julia server.jl, then in shell I can get
sh> curl localhost:8081 Hello%
So, if I want to make changes to the function
hello, is it possible to get new version of this function without restarting the server?
I’ve seen [ANN] LiveServer: A simple development server with live-reload capability, but as far as I understood it is more suitable for static HTML, or I wasn’t able to figure out, how to bend it for my usecase.
I do not mind any sort of hacks (and Revise is totally fine of course) as long as they work.