This commit is contained in:
2025-07-20 21:22:20 -04:00
parent 349f7fad57
commit 62336753c6
7 changed files with 165 additions and 0 deletions

34
client/main.go Normal file
View File

@@ -0,0 +1,34 @@
package main
import (
"context"
"fmt"
"io"
"os"
"os/signal"
"git.dubyatp.xyz/orphanage/client/server"
)
func run(ctx context.Context, w io.Writer, args []string) error {
ctx, cancel := signal.NotifyContext(ctx, os.Interrupt)
defer cancel()
config := struct {
Host string
Port string
}{
Host: "0.0.0.0",
Port: "8080",
}
return server.StartServer(ctx, config)
}
func main() {
ctx := context.Background()
if err := run(ctx, os.Stdout, os.Args); err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err)
os.Exit(1)
}
}