forked from apps/featurer
Initial commit.
This commit is contained in:
42
server/cmd/cms/main.go
Normal file
42
server/cmd/cms/main.go
Normal file
@@ -0,0 +1,42 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log/slog"
|
||||
|
||||
"go.dev.pztrn.name/featurer/server/internal/application"
|
||||
"go.dev.pztrn.name/featurer/server/internal/services/core/datastore"
|
||||
)
|
||||
|
||||
func main() {
|
||||
_ = slog.SetLogLoggerLevel(slog.LevelDebug)
|
||||
|
||||
app := application.New()
|
||||
|
||||
slog.Info(
|
||||
"Launching Featurer's CMS...",
|
||||
"version", application.Version,
|
||||
"build", application.Build,
|
||||
"branch", application.Branch,
|
||||
"commit", application.Commit,
|
||||
"build date", application.BuildDate,
|
||||
)
|
||||
|
||||
// Initializing core services first.
|
||||
checkError(datastore.Initialize(app))
|
||||
|
||||
// Then - features services.
|
||||
|
||||
// Start application.
|
||||
checkError(app.Start())
|
||||
|
||||
<-app.GetShutdownDoneChannel()
|
||||
slog.Info("Featurer's CMS.")
|
||||
}
|
||||
|
||||
func checkError(err error) {
|
||||
if err == nil {
|
||||
return
|
||||
}
|
||||
|
||||
panic(err)
|
||||
}
|
||||
Reference in New Issue
Block a user