1
0
Fork 0
httpserver/command/cmd/main.go

32 Zeilen
500 B
Go

// Package main sets up an simple httpserver without any sites
package main
import (
"log"
"os"
"github.com/rs/zerolog"
"go.sebtobie.de/generic/logging"
"go.sebtobie.de/httpserver/command"
)
func main() {
2022-11-13 09:36:51 +00:00
log.SetOutput(
zerolog.MultiLevelWriter(
zerolog.ConsoleWriter{
Out: os.Stdout,
NoColor: false,
},
logging.NewJournalDWriter(),
),
)
s, err := command.Server("config.toml")
if s == nil {
if err != nil {
os.Exit(1)
}
os.Exit(0)
}
s.StartServer()
}