VARIS VONGUEA-AREE

🔥🇹🇭 Bangkok Thailand

High level experience in web design and development knowledge, producing quality work.

For more info
  • Home
  • About
  • project
  • Blog
    • th
  • Varisz
  • Golang
  • Go Chi

Go Chi

ตัวช่วยในการทำ router สำหรับ Go HTTP services

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

Example

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("welcome"))
	})
	http.ListenAndServe(":3000", r)
}

Related

Monolith
Pwabuilder
Rust Primitives
Ansible

© 2021 All rights reserved by varisz