28 lines
445 B
Go
28 lines
445 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
|
|
"gitstore.ru/tolikproh/sirius/internal/server"
|
|
)
|
|
|
|
func main() {
|
|
flag.Parse()
|
|
|
|
cfg, err := initConfig()
|
|
if err != nil {
|
|
fmt.Printf("Error initializing configs file (configs set default): %s\n", err.Error())
|
|
}
|
|
|
|
log := NewLogger(cfg)
|
|
|
|
app := server.New(cfg, log)
|
|
|
|
fmt.Printf("Start server on lister port: %s\n", cfg.Srv.Port)
|
|
|
|
if err := app.Run(); err != nil {
|
|
log.Fatalf("%s", err.Error())
|
|
}
|
|
}
|