Compare commits

...

2 commits

Author SHA1 Message Date
efe68feef3 embed index.html 2023-01-23 11:30:42 -03:00
d5664a729e ignorar binario compilado 2023-01-23 10:51:49 -03:00
2 changed files with 7 additions and 1 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
cache/
rootfs/
test
gitea-ci/gitea-ci

View file

@ -7,8 +7,13 @@ import (
"strings"
"gitea.nulo.in/Nulo/repro-run/gitea-ci/gitea"
_ "embed"
)
//go:embed index.html
var index []byte
func main() {
config := parseConfig()
@ -31,7 +36,7 @@ func main() {
http.Handle("/webhook", webhook{config: config, gitea: g})
http.Handle("/logs/socket/", logWebsocket{})
http.Handle("/", http.FileServer(http.Dir(".")))
http.Handle("/", staticRoute{file: index, mime: "text/html; charset=utf-8"})
log.Fatal(http.ListenAndServe(port, nil))
}