main.go 459 B

12345678910111213141516171819202122232425
  1. package main
  2. import (
  3. "log"
  4. "github.com/dmitriygnatenko/internal/fiber"
  5. sp "github.com/dmitriygnatenko/internal/service_provider"
  6. _ "github.com/go-sql-driver/mysql"
  7. )
  8. func main() {
  9. serviceProvider, err := sp.Init()
  10. if err != nil {
  11. log.Fatal(err)
  12. }
  13. fiberApp, err := fiber.Init(serviceProvider)
  14. if err != nil {
  15. log.Fatal(err)
  16. }
  17. if err = fiberApp.Listen(":" + serviceProvider.GetEnvService().GetAppPort()); err != nil {
  18. log.Fatal(err)
  19. }
  20. }