Initial commit

This commit is contained in:
2024-05-30 19:42:26 +03:00
commit f04111c689
13 changed files with 455 additions and 0 deletions

30
cmd/service/main.go Normal file
View File

@@ -0,0 +1,30 @@
package main
import (
"context"
"os/signal"
"sync"
"syscall"
"marketlab/application"
"go.uber.org/zap"
)
func main() {
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
defer cancel()
app, err := application.NewApplication(ctx)
if err != nil {
panic(err)
}
wg := &sync.WaitGroup{}
if err := app.Start(ctx, wg); err != nil {
app.Logger.Fatal("startup", zap.Error(err))
}
wg.Wait()
}