updown/main.go

28 lines
476 B
Go

package main
import (
"fmt"
"github.com/ollien/updown/config"
"github.com/ollien/updown/web"
"github.com/sirupsen/logrus"
)
func main() {
logger := logrus.New()
appConfig, err := config.Load()
if err == config.ErrDefaultConfig {
logger.Warn(err)
} else if err != nil {
logger.Fatal(err)
}
logger.Info("Starting webserver...")
fmt.Printf("%+v\n", appConfig)
webserver := web.NewWebserver()
err = webserver.Start()
if err != nil {
logger.Error(err)
}
}