Skip to content

milhamsuryapratama/ngamux

 
 

Repository files navigation

ngamux

Simple HTTP router for Go

made-with-Go Go Version GoDoc Reference GoReportCard Coverage Status


Installation

Run this command with correctly configured Go toolchain.

go get github.com/ngamux/ngamux

Examples

package main

import(
  "net/http"
  "github.com/ngamux/ngamux"
)

func main() {
  mux := ngamux.New()
  mux.Get("/", func(rw http.ResponseWriter, r *http.Request) error {
    return ngamux.JSON(rw, ngamux.Map{
      "message": "welcome!",
    })
  })
  
  http.ListenAndServe(":8080", mux)
}

See more examples!

Provided Middlewares

License

This project is licensed under the Mozilla Public License 2.0.

Contributors

Thanks to all contributors!

Contributors

About

Simple HTTP router for Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%