main.go 518 B

123456789101112131415161718192021222324252627
  1. package main
  2. import (
  3. "fmt"
  4. "log"
  5. _ "github.com/go-sql-driver/mysql"
  6. "git.dmitriygnatenko.ru/dima/dmitriygnatenko-v2/internal/fiber"
  7. sp "git.dmitriygnatenko.ru/dima/dmitriygnatenko-v2/internal/service_provider"
  8. )
  9. func main() {
  10. serviceProvider, err := sp.Init()
  11. if err != nil {
  12. log.Fatal(err)
  13. }
  14. fiberApp, err := fiber.Init(serviceProvider)
  15. if err != nil {
  16. log.Fatal(err)
  17. }
  18. if err = fiberApp.Listen(fmt.Sprintf(":%d", serviceProvider.ConfigService().AppPort())); err != nil {
  19. log.Fatal(err)
  20. }
  21. }