This commit is contained in:
parent
59b2bc0deb
commit
954e4c5a34
2 changed files with 14 additions and 1 deletions
8
main.go
8
main.go
|
@ -20,6 +20,7 @@ import (
|
||||||
storagenew "git.mstar.dev/mstar/linstrom/storage-new"
|
storagenew "git.mstar.dev/mstar/linstrom/storage-new"
|
||||||
"git.mstar.dev/mstar/linstrom/storage-new/dbgen"
|
"git.mstar.dev/mstar/linstrom/storage-new/dbgen"
|
||||||
"git.mstar.dev/mstar/linstrom/storage/cache"
|
"git.mstar.dev/mstar/linstrom/storage/cache"
|
||||||
|
webdebug "git.mstar.dev/mstar/linstrom/web/debug"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO: Add frontend overwrite
|
// TODO: Add frontend overwrite
|
||||||
|
@ -124,4 +125,11 @@ func newServer() {
|
||||||
if err = storagenew.InsertSelf(); err != nil {
|
if err = storagenew.InsertSelf(); err != nil {
|
||||||
log.Fatal().Err(err).Msg("Failed to insert self properly")
|
log.Fatal().Err(err).Msg("Failed to insert self properly")
|
||||||
}
|
}
|
||||||
|
if *shared.FlagStartDebugServer {
|
||||||
|
log.Info().Msg("Starting debug server")
|
||||||
|
// TODO: Move into goroutine once public server also exists
|
||||||
|
if err = webdebug.New().Start(); err != nil {
|
||||||
|
log.Fatal().Err(err).Msg("Debug server failed")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,11 @@ var (
|
||||||
"If set, the server will only validate the config (or write the default one) and then quit",
|
"If set, the server will only validate the config (or write the default one) and then quit",
|
||||||
)
|
)
|
||||||
FlagStartNew *bool = flag.Bool("new", false, "Start the new system")
|
FlagStartNew *bool = flag.Bool("new", false, "Start the new system")
|
||||||
|
FlagStartDebugServer *bool = flag.Bool(
|
||||||
|
"debugserver",
|
||||||
|
false,
|
||||||
|
"Also start the local debugging server",
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
func flagUsage() {
|
func flagUsage() {
|
||||||
|
|
Loading…
Reference in a new issue