go-chi

path: full-stack/go-chi-server/go-chi.md.md

- **fileName**: go-chi.md
- **Created on**: 2024-09-16 14:23:54
Tip

! > let's talk about go chi it's a light wight server for go lang and have some
packages like middleware and rendar

Features

Example in go

package main
import (
    "net/http"
    "github.com/go-chi/chi/v5"
    "github.com/go-chi/chi/v5/middleware"
)
func main() {
    r := chi.NewRouter()
    r.Use(middleware.Logger)
    r.Get("/", func(w http.ResponseWriter, r *http.Request) {
        w.Write([]byte("Hello World!"))
    })
    http.ListenAndServe(":3000", r)
}

installation :

go get github.com/go-chi/chi/v5

continue:go-validator.md