Initialize Go module and create basic HTTP server structure with cmd/pkg layout. Server responds on :8080 with health check endpoint.
13 lines
203 B
Go
13 lines
203 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func main() {
|
|
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
|
w.Write([]byte("AlpenQueue running!"))
|
|
})
|
|
http.ListenAndServe(":8080", nil)
|
|
}
|