Skip to content

lemredd/gohttp

Repository files navigation

gohttp

Reinventing the net/http compatible wheel.

Features

This project took inspiration from go-chi/chi while embracing the latest features of net/http.

  • HTTP request method handling
  • Middlewares

Examples

see examples for more details

package main

import (
	"fmt"
	"net/http"

	"github.com/lemredd/gohttp/v0"
)

var PORT = fmt.Sprintf(":%v", 8080)

func main() {
	mux := gohttp.NewMux()
	mux.HandleFunc("GET /{$}", func(w http.ResponseWriter, r *http.Request) {
		w.Write([]byte("Hello World!"))
	})

	fmt.Printf("Listening on port %v\n", PORT)
	http.ListenAndServe(PORT, mux)
}

TODOs

Items in this list will be appended to features section.

About

Reinventing the `net/http` compatible wheel

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published