123456789101112131415161718192021222324252627282930313233343536 |
- package main
- import (
- "log"
- "time"
- _ "github.com/lib/pq"
- "git.dmitriygnatenko.ru/dima/homethings/internal/fiber"
- sp "git.dmitriygnatenko.ru/dima/homethings/internal/service_provider"
- )
- // @title Homethings API
- // @version 1.0
- // @securitydefinitions.apikey APIKey
- // @in header
- // @name Authorization
- func main() {
- serviceProvider, err := sp.Init()
- if err != nil {
- log.Fatal(err)
- }
- fiberApp, err := fiber.Init(serviceProvider)
- if err != nil {
- log.Fatal(err)
- }
- if err = fiberApp.Listen(":" + serviceProvider.GetEnvService().GetAppPort()); err != nil {
- log.Fatal(err)
- }
- }
- func init() {
- time.Local = time.UTC
- }
|