all repos — legit @ d62fb1442bc300dcee2a7c6a9c374201ba1c7ae6

web frontend for git

main.go (view raw)

 1package main
 2
 3import (
 4	"flag"
 5	"log"
 6	"net/http"
 7
 8	"icyphox.sh/legit/config"
 9	"icyphox.sh/legit/routes"
10)
11
12func main() {
13	var cfg string
14	flag.StringVar(&cfg, "config", "./config.yaml", "path to config file")
15	flag.Parse()
16
17	c, err := config.Read(cfg)
18	if err != nil {
19		log.Fatal(err)
20	}
21
22	mux := routes.Handlers(c)
23	log.Fatal(http.ListenAndServe(":5555", mux))
24}