albatros/bin/ci.go
Quentin Dufour 664dc72ec5
All checks were successful
Albatros default
rework building
2023-05-04 11:00:37 +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")
}
}