Add configuration for HTTP and debug mode

This commit is contained in:
eikendev 2020-07-31 20:04:33 +02:00
parent ba0306f384
commit 354ce0c08d
No known key found for this signature in database
GPG key ID: A1BDB1B28C8EF694
4 changed files with 22 additions and 5 deletions

9
app.go
View file

@ -31,6 +31,10 @@ func main() {
c := configuration.Get()
if c.Debug {
log.Printf("%+v\n", c)
}
cm := credentials.CreateManager(c.Crypto)
db, err := database.Create(cm, c.Database.Dialect, c.Database.Connection)
@ -51,6 +55,7 @@ func main() {
setupCleanup(db, dp)
engine := router.Create(db, dp)
runner.Run(engine)
engine := router.Create(c.Debug, db, dp)
runner.Run(engine, c.HTTP.ListenAddress, c.HTTP.Port)
}