diff options
| author | RanXom <saiyedshizain@gmail.com> | 2026-07-13 15:18:24 +0530 |
|---|---|---|
| committer | RanXom <saiyedshizain@gmail.com> | 2026-07-13 15:18:24 +0530 |
| commit | 1321dbf84b2e81045fedc8c54a0c4158c08b2d7c (patch) | |
| tree | a4ea36098629417acc119303dec826e84c9548d0 /cmd/galleryd | |
| parent | 735e7310c904abf18293456d37044dd9c5e796b0 (diff) | |
| download | galleryd-1321dbf84b2e81045fedc8c54a0c4158c08b2d7c.tar.xz galleryd-1321dbf84b2e81045fedc8c54a0c4158c08b2d7c.zip | |
feat(api): wire application entrypoint
Diffstat (limited to 'cmd/galleryd')
| -rw-r--r-- | cmd/galleryd/main.go | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/cmd/galleryd/main.go b/cmd/galleryd/main.go new file mode 100644 index 0000000..444ce34 --- /dev/null +++ b/cmd/galleryd/main.go @@ -0,0 +1,30 @@ +package main + +import ( + "context" + "log" + "os" + "os/signal" + "syscall" + + "github.com/RanXom/galleryd/internal/api" +) + +func main() { + ctx, stop := signal.NotifyContext( + context.Background(), + os.Interrupt, + syscall.SIGTERM, + ) + defer stop() + + server := api.New(api.Config{ + Address: ":8082", + }) + + log.Println("galleryd listening on :8082") + + if err := server.Run(ctx); err != nil { + log.Fatal(err) + } +} |