gohttpserver/cmd/httpd/main.go

37 lines
750 B
Go
Raw Normal View History

package main
import (
2022-11-28 03:59:20 +00:00
"git.eeqj.de/sneak/gohttpserver/internal/config"
"git.eeqj.de/sneak/gohttpserver/internal/database"
"git.eeqj.de/sneak/gohttpserver/internal/globals"
"git.eeqj.de/sneak/gohttpserver/internal/handlers"
"git.eeqj.de/sneak/gohttpserver/internal/logger"
"git.eeqj.de/sneak/gohttpserver/internal/server"
2022-11-28 03:59:20 +00:00
"go.uber.org/fx"
)
2020-10-10 15:08:37 +00:00
var (
Appname string = "CHANGEME"
Version string
Buildarch string
)
func main() {
2022-11-28 03:59:20 +00:00
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,
),
fx.Invoke(func(*server.Server) {}),
).Run()
// os.Exit(server.Run(Appname, Version, Buildarch))
}