2020-09-30 08:28:06 +00:00
|
|
|
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"
|
2022-11-28 05:00:44 +00:00
|
|
|
"git.eeqj.de/sneak/gohttpserver/internal/healthcheck"
|
2022-11-28 03:59:20 +00:00
|
|
|
"git.eeqj.de/sneak/gohttpserver/internal/logger"
|
2022-11-28 05:00:44 +00:00
|
|
|
"git.eeqj.de/sneak/gohttpserver/internal/middleware"
|
2022-11-28 00:19:47 +00:00
|
|
|
"git.eeqj.de/sneak/gohttpserver/internal/server"
|
2022-11-28 03:59:20 +00:00
|
|
|
"go.uber.org/fx"
|
2020-09-30 08:28:06 +00:00
|
|
|
)
|
|
|
|
|
2020-10-10 15:08:37 +00:00
|
|
|
var (
|
|
|
|
Appname string = "CHANGEME"
|
|
|
|
Version string
|
|
|
|
Buildarch string
|
|
|
|
)
|
2020-09-30 08:28:06 +00:00
|
|
|
|
|
|
|
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,
|
2022-11-28 05:00:44 +00:00
|
|
|
middleware.New,
|
|
|
|
healthcheck.New,
|
2022-11-28 03:59:20 +00:00
|
|
|
),
|
|
|
|
fx.Invoke(func(*server.Server) {}),
|
|
|
|
).Run()
|
|
|
|
// os.Exit(server.Run(Appname, Version, Buildarch))
|
2020-09-30 08:28:06 +00:00
|
|
|
}
|