albatros/bin/albatros.go

24 lines
467 B
Go
Raw Normal View History

2023-04-17 09:25:26 +00:00
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")
}
}