elegir puerto

This commit is contained in:
Cat /dev/Nulo 2023-01-23 10:46:36 -03:00
parent 0838dffc81
commit 576c5d749c

View file

@ -24,10 +24,15 @@ func main() {
}
log.Printf("Logged in as @%s", u.Login)
port := ":8080"
if len(os.Args) > 1 {
port = os.Args[1]
}
http.Handle("/webhook", webhook{config: config, gitea: g})
http.Handle("/logs/socket/", logWebsocket{})
http.Handle("/", http.FileServer(http.Dir(".")))
log.Fatal(http.ListenAndServe(":8080", nil))
log.Fatal(http.ListenAndServe(port, nil))
}
type config struct {