all repos — legit @ 01f27147baf80e2222927ddca9369c7d99b4ff3c

web frontend for git, written in go

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}