aboutsummaryrefslogtreecommitdiff
path: root/cmd/galleryd/main.go
diff options
context:
space:
mode:
authorRanXom <saiyedshizain@gmail.com>2026-07-13 15:18:24 +0530
committerRanXom <saiyedshizain@gmail.com>2026-07-13 15:18:24 +0530
commit1321dbf84b2e81045fedc8c54a0c4158c08b2d7c (patch)
treea4ea36098629417acc119303dec826e84c9548d0 /cmd/galleryd/main.go
parent735e7310c904abf18293456d37044dd9c5e796b0 (diff)
downloadgalleryd-1321dbf84b2e81045fedc8c54a0c4158c08b2d7c.tar.xz
galleryd-1321dbf84b2e81045fedc8c54a0c4158c08b2d7c.zip
feat(api): wire application entrypoint
Diffstat (limited to 'cmd/galleryd/main.go')
-rw-r--r--cmd/galleryd/main.go30
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)
+ }
+}