Skip to content

SimonRichardson/wishful-route

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wishful-route

Wishful http routing.

Wishful Route

Build Status

Example

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"]))
        }),
    },
)))

About

Wishful http routing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages