Newer
Older
pokemon-go-trade / vendor / github.com / go-chi / chi / _examples / hello-world / main.go
Simon Lindgren on 12 Feb 2021 322 bytes first commit
package main

import (
	"net/http"

	"github.com/go-chi/chi"
	"github.com/go-chi/chi/middleware"
)

func main() {
	r := chi.NewRouter()
	r.Use(middleware.RequestID)
	r.Use(middleware.Logger)
	r.Get("/", func(w http.ResponseWriter, r *http.Request) {
		w.Write([]byte("hello world"))
	})
	http.ListenAndServe(":3333", r)
}