41 lines
962 B
Go
41 lines
962 B
Go
// Package main is the entry point for the pixad image proxy server.
|
|
package main
|
|
|
|
import (
|
|
"go.uber.org/fx"
|
|
"sneak.berlin/go/pixa/internal/config"
|
|
"sneak.berlin/go/pixa/internal/database"
|
|
"sneak.berlin/go/pixa/internal/globals"
|
|
"sneak.berlin/go/pixa/internal/handlers"
|
|
"sneak.berlin/go/pixa/internal/healthcheck"
|
|
"sneak.berlin/go/pixa/internal/logger"
|
|
"sneak.berlin/go/pixa/internal/middleware"
|
|
"sneak.berlin/go/pixa/internal/server"
|
|
)
|
|
|
|
var (
|
|
Appname = "pixad" //nolint:gochecknoglobals // set by ldflags
|
|
Version string //nolint:gochecknoglobals // set by ldflags
|
|
Buildarch string //nolint:gochecknoglobals // set by ldflags
|
|
)
|
|
|
|
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()
|
|
}
|