1234567891011121314151617181920212223242526272829303132333435 |
- package main
- import (
- "log"
- "time"
- "git.dmitriygnatenko.ru/dima/homethings/internal/fiber"
- sp "git.dmitriygnatenko.ru/dima/homethings/internal/service_provider"
- _ "github.com/lib/pq"
- )
- // @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
- }
|