first commit

This commit is contained in:
2025-09-30 20:21:33 +02:00
commit 68902f86af
10 changed files with 418 additions and 0 deletions

21
cmd/server/main.go Normal file
View File

@@ -0,0 +1,21 @@
package main
import (
"fmt"
"mirror-sync/cmd/server/api"
"mirror-sync/pkg/constants"
"os"
"runtime"
)
func main() {
fmt.Printf("mirror-sync daemon -- v%s.%s.%s\n\n", constants.Version, runtime.GOOS, runtime.GOARCH)
s := api.NewServer(8080)
fmt.Println("daemon listening to :8080")
if err := s.Server.ListenAndServe(); err != nil {
fmt.Fprintln(os.Stderr, "failed to start server:", err.Error())
os.Exit(1)
}
}