Add --data, --listen and --ports to byre serve for task previews

This commit is contained in:
Ian Gulliver
2026-10-15 12:39:46 -07:00
parent 8beab6e384
commit 4a9888e653
18 changed files with 100 additions and 39 deletions
+2 -2
View File
@@ -38,7 +38,7 @@ type Server struct {
type ctxKey struct{}
func New(dataDir string, spa fs.FS) (*Server, error) {
func New(dataDir string, portFirst int, spa fs.FS) (*Server, error) {
err := os.MkdirAll(dataDir, 0o755)
if err != nil {
return nil, err
@@ -52,7 +52,7 @@ func New(dataDir string, spa fs.FS) (*Server, error) {
users: map[string]string{},
}
s.store, err = store.Open(filepath.Join(dataDir, "byre.db"), s.publish)
s.store, err = store.Open(filepath.Join(dataDir, "byre.db"), portFirst, s.publish)
if err != nil {
return nil, err
}