Build-Test
This commit is contained in:
6
main.go
6
main.go
@@ -480,14 +480,14 @@ func (s *Server) routes() http.Handler {
|
||||
mux.HandleFunc("/status", s.handleStatus)
|
||||
|
||||
// Static UI
|
||||
sub, _ := fs.Sub(embedded, "web")
|
||||
sub, _ := fs.Sub(embedded, "/web")
|
||||
mux.Handle("/", http.FileServer(http.FS(sub)))
|
||||
|
||||
return mux
|
||||
}
|
||||
|
||||
func main() {
|
||||
port := getenv("PORT", "8080")
|
||||
port := getenv("PORT", ":8080")
|
||||
maxPerRoom := getenvInt("MAX_PER_ROOM", 200)
|
||||
secret := os.Getenv("CLIPBOARD_TOKEN")
|
||||
persist := os.Getenv("CLIPBOARD_DATA")
|
||||
@@ -498,7 +498,7 @@ func main() {
|
||||
}
|
||||
|
||||
srv := &http.Server{
|
||||
Addr: ":" + port,
|
||||
Addr: port,
|
||||
Handler: s.routes(),
|
||||
ReadHeaderTimeout: 10 * time.Second,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user