Eg :
using Mux
@app test = (
Mux.defaults,
page(respond("<h1>Yo!</h1>")),
page("/about", probabilty(0.5, respond("<h1>Boo tati!</h1>")),
respond("<h1>About Me</h1>")),
page("/user/:user", req -> "<h1>Hello, $(req[:params][:user])!</h1>"),
Mux.notfound())
#route("/about", respond("<h1>Hello World!</h1>")),
#route("/prince", respond("<h1>Hello Prince!</h1>")),
serve(test)
How to stop this server ? So that I can create a new one at the same address. Now, if I try to create a new without stopping current one it raises an error - listen: address already in use (EADDRINUSE) .