2020-02-13 13:14:36 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"log"
|
|
|
|
"net/http"
|
2022-07-12 08:27:45 +00:00
|
|
|
|
|
|
|
"github.com/go-chi/chi/v5"
|
|
|
|
"github.com/go-chi/chi/v5/middleware"
|
2020-02-13 13:14:36 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func handler(w http.ResponseWriter, r *http.Request) {
|
2022-07-12 08:27:45 +00:00
|
|
|
fmt.Fprintf(
|
|
|
|
w, `
|
2020-02-13 13:14:36 +00:00
|
|
|
## .
|
|
|
|
## ## ## ==
|
|
|
|
## ## ## ## ## ===
|
|
|
|
/"""""""""""""""""\___/ ===
|
|
|
|
{ / ===-
|
|
|
|
\______ O __/
|
|
|
|
\ \ __/
|
|
|
|
\____\_______/
|
|
|
|
|
|
|
|
|
|
|
|
Hello from Docker!
|
|
|
|
|
2022-07-12 08:27:45 +00:00
|
|
|
`,
|
|
|
|
)
|
2020-02-13 13:14:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
2022-07-12 08:27:45 +00:00
|
|
|
r := chi.NewRouter()
|
|
|
|
r.Use(middleware.Logger)
|
|
|
|
r.Get("/", handler)
|
|
|
|
|
|
|
|
fmt.Println("Go backend started!")
|
|
|
|
log.Fatal(http.ListenAndServe(":80", r))
|
2020-02-13 13:14:36 +00:00
|
|
|
}
|