Client build scripts fixes and server stub with local devzone.
All checks were successful
Linting and tests / Linting (push) Successful in 6s
All checks were successful
Linting and tests / Linting (push) Successful in 6s
This commit is contained in:
39
server/cmd/bunkerd/main.go
Normal file
39
server/cmd/bunkerd/main.go
Normal file
@@ -0,0 +1,39 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"bunker/commons"
|
||||
"bunker/server/internal/application"
|
||||
)
|
||||
|
||||
func main() {
|
||||
app := application.New()
|
||||
|
||||
lgr := app.NewLogger("module", "main")
|
||||
lgr.Info(
|
||||
"Starting bunkerd...",
|
||||
"version", commons.Version,
|
||||
"build_no", commons.Build,
|
||||
"buint_on", commons.BuildDate,
|
||||
"commit", commons.Commit,
|
||||
"branch", commons.Branch,
|
||||
)
|
||||
|
||||
if err := app.Start(); err != nil {
|
||||
lgr.Error("Failed to start bunkerd!", "error", err.Error())
|
||||
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
lgr.Info("bunkerd started.")
|
||||
|
||||
<-app.ShutdownChan()
|
||||
lgr.Info("Shutting down bunkerd...")
|
||||
|
||||
if err := app.Shutdown(); err != nil {
|
||||
lgr.Error("Failed to shutdown bunkerd!", "error", err.Error())
|
||||
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user