Compare commits
2 commits
576c5d749c
...
efe68feef3
Author | SHA1 | Date | |
---|---|---|---|
efe68feef3 | |||
d5664a729e |
2 changed files with 7 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
cache/
|
cache/
|
||||||
rootfs/
|
rootfs/
|
||||||
test
|
test
|
||||||
|
gitea-ci/gitea-ci
|
||||||
|
|
|
@ -7,8 +7,13 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"gitea.nulo.in/Nulo/repro-run/gitea-ci/gitea"
|
"gitea.nulo.in/Nulo/repro-run/gitea-ci/gitea"
|
||||||
|
|
||||||
|
_ "embed"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//go:embed index.html
|
||||||
|
var index []byte
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
config := parseConfig()
|
config := parseConfig()
|
||||||
|
|
||||||
|
@ -31,7 +36,7 @@ func main() {
|
||||||
|
|
||||||
http.Handle("/webhook", webhook{config: config, gitea: g})
|
http.Handle("/webhook", webhook{config: config, gitea: g})
|
||||||
http.Handle("/logs/socket/", logWebsocket{})
|
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))
|
log.Fatal(http.ListenAndServe(port, nil))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue