switch to pgx driver + create merch
This commit is contained in:
parent
546fe13107
commit
97f8d27430
13 changed files with 289 additions and 69 deletions
|
|
@ -2,18 +2,19 @@ package main
|
|||
|
||||
import (
|
||||
"context"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"merch-api/config"
|
||||
_ "merch-api/docs"
|
||||
"merch-api/internal/app"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// @Title Merch API
|
||||
// @Version 2.3
|
||||
// @Description Stores data about merch and prices
|
||||
// @Version 2.3
|
||||
// @Description Stores data about merch and prices
|
||||
// @BasePath /api/v2
|
||||
func main() {
|
||||
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||
|
|
@ -22,7 +23,7 @@ func main() {
|
|||
cfg := config.NewConfig()
|
||||
config.LogSetup(cfg.App.Mode, cfg.App.LogLvl)
|
||||
|
||||
appl := app.New(cfg)
|
||||
appl := app.New(ctx, cfg)
|
||||
|
||||
if err := appl.Run(ctx); err != nil {
|
||||
log.Fatal(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue