Wishful http routing.
This is an example of what a simple route could look like (this is going through some major workings, so this might be already out of date. See source code for latest documentation!)
Serve(Listen(address, Route(
func() Promise {
return NotFound("Nope!")
},
[]func(x *Request) Option{
Get("/", func(req *Request) Promise {
return Ok("Hello World!")
}),
Get("/:echo", func(req *Request) Promise {
return Ok(fmt.Sprintf("%s", req.Params["echo"]))
}),
},
)))