albatros/bin/albatros.go
2023-05-03 10:52:34 +02:00

23 lines
464 B
Go

package main
import (
"log"
"net/http"
"git.deuxfleurs.fr/deuxfleurs/albatros/pkg"
)
func main() {
config := pkg.BuildConfig()
cluster := pkg.NewCluster(&config)
// init webserver
http.Handle("/hook", pkg.HookHandler{&config, &cluster})
http.Handle("/build", pkg.BuildHandler{&config, &cluster})
// launch
log.Println("Albatros listen on :8080")
if err := http.ListenAndServe(":8080", nil); err != nil {
log.Fatal("Can't start HTTP server")
}
}