Drop the web app; the macOS app is byre's only client
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"log/slog"
|
||||
"net"
|
||||
"net/http"
|
||||
@@ -29,7 +28,6 @@ type Server struct {
|
||||
hub *hub
|
||||
terminals *terminals
|
||||
startedAt time.Time
|
||||
spa fs.FS
|
||||
|
||||
usersMu sync.Mutex
|
||||
users map[string]string
|
||||
@@ -37,7 +35,7 @@ type Server struct {
|
||||
|
||||
type ctxKey struct{}
|
||||
|
||||
func New(dataDir string, portFirst int, spa fs.FS) (*Server, error) {
|
||||
func New(dataDir string, portFirst int) (*Server, error) {
|
||||
err := os.MkdirAll(dataDir, 0o755)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -47,7 +45,6 @@ func New(dataDir string, portFirst int, spa fs.FS) (*Server, error) {
|
||||
hub: newHub(),
|
||||
terminals: newTerminals(),
|
||||
startedAt: time.Now().UTC(),
|
||||
spa: spa,
|
||||
users: map[string]string{},
|
||||
}
|
||||
|
||||
@@ -107,7 +104,6 @@ func (s *Server) Handler() http.Handler {
|
||||
writeError(w, http.StatusBadRequest, err)
|
||||
},
|
||||
})
|
||||
mux.Handle("/", http.FileServerFS(s.spa))
|
||||
return mux
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user