Skip to content

mwildt/go-http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mwildt/go-http

This is a simple utility-package for handling http requests.

Router

func main() {
    router := routing.NewRouter(func(router routing.Routing) {

        router.Handle(
            routing.Path("/api/**"),
            httputil.NewSingleHostReverseProxy(serviceLocation))

        router.Handle(
            routing.Path("/**").Method("GET"),
            http.FileServer(http.Dir("/static/")))

    })

    err = http.ListenAndServe(":8080", router)
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages