directory/cmd/httpd/main.go

40 lines
806 B
Go

package main
import (
"go.uber.org/fx"
"sneak.berlin/go/directory/internal/config"
"sneak.berlin/go/directory/internal/database"
"sneak.berlin/go/directory/internal/globals"
"sneak.berlin/go/directory/internal/handlers"
"sneak.berlin/go/directory/internal/healthcheck"
"sneak.berlin/go/directory/internal/logger"
"sneak.berlin/go/directory/internal/middleware"
"sneak.berlin/go/directory/internal/server"
)
var (
Appname string = "directory"
Version string
Buildarch string
)
func main() {
globals.Appname = Appname
globals.Version = Version
globals.Buildarch = Buildarch
fx.New(
fx.Provide(
config.New,
database.New,
globals.New,
handlers.New,
logger.New,
server.New,
middleware.New,
healthcheck.New,
),
fx.Invoke(func(*server.Server) {}),
).Run()
}