sirius/cmd/apisirius/main.go
2023-04-17 15:48:09 +10:00

27 lines
492 B
Go

package main
import (
"os"
log "github.com/sirupsen/logrus"
"github.com/spf13/viper"
"gitstore.ru/tolikproh/sirius/internal/model"
"gitstore.ru/tolikproh/sirius/internal/server"
)
func main() {
log.SetFormatter(&log.JSONFormatter{})
log.SetOutput(os.Stdout)
log.SetLevel(log.WarnLevel)
if err := model.Init(); err != nil {
log.Fatalf("%s", err.Error())
}
app := server.NewApp(viper.GetString("port"))
if err := app.Run(); err != nil {
log.Fatalf("%s", err.Error())
}
}